numpy.flatiter
- class numpy.flatiter
Flat iterator object to iterate over arrays.
A
flatiteriterator is returned byx.flatfor any array x. It allows iterating over the array as if it were a 1-D array, either in a for-loop or by calling its next method.Iteration is done in row-major, C-style order (the last index varying the fastest). The iterator can also be indexed using basic slicing or advanced indexing.