同構多維數組是 NumPy 的主要對象。它本質上是一個元素表,這些元素都是相同類型的,並由一個正整數元組索引。這些維度在 NumPy 中稱為軸。
NumPy 的數組類稱為 ndarray 或別名數組。 numpy.array 與標準 Python 庫類 array.array 不同。 array.array 僅處理一維數組並提供較少的函數。
用法
numpy.array(object, dtype=None, copy=True, order='K', subok=False, ndmin=0)
參數
numpy.array() 函數中有以下參數。
1) 對象:數組
任何對象,它公開一個數組接口,其 __array__ 方法返回任何嵌套序列或數組。相關用法
- Python numpy.array_repr()用法及代碼示例
- Python numpy.array_str()用法及代碼示例
- Python numpy.array_split()用法及代碼示例
- Python numpy.array_equal()用法及代碼示例
- Python numpy.array_equiv()用法及代碼示例
- Python numpy.argwhere()用法及代碼示例
- Python numpy.arccosh()用法及代碼示例
- Python numpy.arcsinh()用法及代碼示例
- Python numpy.argmax()用法及代碼示例
- Python numpy.arctan()用法及代碼示例
- Python numpy.around()用法及代碼示例
- Python numpy.arccos()用法及代碼示例
- Python numpy.argmin()用法及代碼示例
- Python numpy.arcsin()用法及代碼示例
- Python numpy.argmax用法及代碼示例
- Python numpy.argsort()用法及代碼示例
- Python numpy.argpartition()用法及代碼示例
- Python numpy.arctan2()用法及代碼示例
- Python numpy.arange()用法及代碼示例
- Python numpy.atleast_2d()用法及代碼示例
注:本文由純淨天空篩選整理自 numpy.array() in Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。