本文簡要介紹 python 語言中  numpy.ma.atleast_1d  的用法。
- 用法:- ma.atleast_1d(*args, **kwargs) = <numpy.ma.extras._fromnxfunction_allargs object>
- 將輸入轉換為至少一維的數組。 - 標量輸入被轉換為一維數組,而高維輸入被保留。 - arys1, arys2, …: array_like
- 一個或多個輸入數組。 
 
- ret: ndarray
- 一個數組或數組列表,每個都帶有 - a.ndim >= 1。僅在必要時進行複製。
 
 - 參數:- 返回:- 注意:- 該函數適用於 _data 和 _mask(如果有)。 - 例子:- >>> np.atleast_1d(1.0) array([1.])- >>> x = np.arange(9.0).reshape(3,3) >>> np.atleast_1d(x) array([[0., 1., 2.], [3., 4., 5.], [6., 7., 8.]]) >>> np.atleast_1d(x) is x True- >>> np.atleast_1d(1, [3, 4]) [array([1]), array([3, 4])]
相關用法
- Python numpy ma.atleast_3d用法及代碼示例
- Python numpy ma.atleast_2d用法及代碼示例
- Python numpy ma.apply_along_axis用法及代碼示例
- Python numpy ma.argmax用法及代碼示例
- Python numpy ma.argmin用法及代碼示例
- Python numpy ma.asarray用法及代碼示例
- Python numpy ma.append用法及代碼示例
- Python numpy ma.allclose用法及代碼示例
- Python numpy ma.average用法及代碼示例
- Python numpy ma.anomalies用法及代碼示例
- Python numpy ma.all用法及代碼示例
- Python numpy ma.array用法及代碼示例
- Python numpy ma.arange用法及代碼示例
- Python numpy ma.allequal用法及代碼示例
- Python numpy ma.anom用法及代碼示例
- Python numpy ma.apply_over_axes用法及代碼示例
- Python numpy ma.asanyarray用法及代碼示例
- Python numpy ma.argsort用法及代碼示例
- Python numpy ma.indices用法及代碼示例
- Python numpy ma.zeros用法及代碼示例
- Python numpy ma.diff用法及代碼示例
- Python numpy ma.mask_rowcols用法及代碼示例
- Python numpy ma.where用法及代碼示例
- Python numpy ma.zeros_like用法及代碼示例
- Python numpy ma.notmasked_contiguous用法及代碼示例
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.ma.atleast_1d。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
