本文簡要介紹 python 語言中  numpy.lib.Arrayterator.flat  的用法。
用法:
property lib.Arrayterator.flatArrayterator 對象的一維平麵迭代器。
該迭代器返回要迭代的數組元素數組生成器逐個。它類似於numpy.flatiter.
例子:
>>> a = np.arange(3 * 4 * 5 * 6).reshape(3, 4, 5, 6) >>> a_itor = np.lib.Arrayterator(a, 2)>>> for subarr in a_itor.flat: ... if not subarr: ... print(subarr, type(subarr)) ... 0 <class 'numpy.int64'>
相關用法
- Python numpy AxisError用法及代碼示例
 - Python numpy RandomState.standard_exponential用法及代碼示例
 - Python numpy hamming用法及代碼示例
 - Python numpy legendre.legint用法及代碼示例
 - Python numpy chararray.ndim用法及代碼示例
 - Python numpy chebyshev.chebsub用法及代碼示例
 - Python numpy chararray.nbytes用法及代碼示例
 - Python numpy ma.indices用法及代碼示例
 - Python numpy matrix.A1用法及代碼示例
 - Python numpy MaskedArray.var用法及代碼示例
 - Python numpy ma.zeros用法及代碼示例
 - Python numpy broadcast用法及代碼示例
 - Python numpy matrix.T用法及代碼示例
 - Python numpy matrix.I用法及代碼示例
 - Python numpy MaskedArray.T用法及代碼示例
 - Python numpy hermite.hermfromroots用法及代碼示例
 - Python numpy hermite_e.hermediv用法及代碼示例
 - Python numpy recarray.dot用法及代碼示例
 - Python numpy random.mtrand.RandomState.wald用法及代碼示例
 - Python numpy trim_zeros用法及代碼示例
 - Python numpy chebyshev.chebdiv用法及代碼示例
 - Python numpy linalg.svd用法及代碼示例
 - Python numpy copy用法及代碼示例
 - Python numpy negative用法及代碼示例
 - Python numpy ndarray.astype用法及代碼示例
 
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.lib.Arrayterator.flat。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
