属性
flatiter.
index
数组中的当前平面索引。
实例
>>> x = np.arange(6).reshape(2, 3) >>> fl = x.flat >>> fl.index 0 >>> next(fl) 0 >>> fl.index 1