cf.Partition.iterarray_indices

Partition.iterarray_indices()[source]

Return an iterator over indices of the partition’s data array.

Note that partition is not conformed.

Returns :
out : generator

An iterator over indices of the partition’s data array.

Examples

>>> p.shape
[2, 1, 3]
>>> for index in p.iterarray_indices():
...     print index
...
(0, 0, 0)
(0, 0, 1)
(0, 0, 2)
(1, 0, 0)
(1, 0, 1)
(1, 0, 2)

Previous topic

cf.Partition.flat

Next topic

cf.Partition.itermaster_indices

This Page