numpy.flatiter.index# attribute flatiter.index# 当前数组的扁平索引. 示例 Try it in your browser! >>> import numpy as np >>> x = np.arange(6).reshape(2, 3) >>> fl = x.flat >>> fl.index 0 >>> next(fl) 0 >>> fl.index 1 Go BackOpen In Tab