shuffle_nested_partition_labels#
- graph_tool.inference.shuffle_nested_partition_labels(x)[source]#
Returns a copy of nested partition
x, with the group labels randomly shuffled.- Parameters:
- xiterable of iterables of
intvalues or iterable ofPropertyMap Partition.
- xiterable of iterables of
- Returns:
- ylist of
numpy.ndarrayor list ofPropertyMap Nested partition with shuffled labels.
- ylist of
Examples
>>> x = [[0, 0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 1], [1, 0]] >>> gt.shuffle_nested_partition_labels(x) [array([0, 0, 0, 2, 2, 2, 1, 1, 1]), array([1, 0, 1]), array([0, 1])]