numpy.flatiter.index#

attribute

flatiter.index#

Current flat index into the array.

Examples

>>>importnumpyasnp>>>x=np.arange(6).reshape(2,3)>>>fl=x.flat>>>fl.index0>>>next(fl)0>>>fl.index1
On this page