本文簡要介紹 python 語言中 numpy.cbrt
的用法。
用法:
numpy.cbrt(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True [, signature, extobj ]) = <ufunc 'cbrt'>
按元素返回數組的cube-root。
- x: array_like
需要cube-roots 的值。
- out: ndarray,None,或 ndarray 和 None 的元組,可選
存儲結果的位置。如果提供,它必須具有輸入廣播到的形狀。如果未提供或 None,則返回一個新分配的數組。元組(隻能作為關鍵字參數)的長度必須等於輸出的數量。
- where: 數組,可選
此條件通過輸入廣播。在條件為真的位置,out數組將設置為 ufunc 結果。在其他地方,out數組將保留其原始值。請注意,如果未初始化out數組是通過默認創建的
out=None
,其中條件為 False 的位置將保持未初始化狀態。- **kwargs:
對於其他僅關鍵字參數,請參閱 ufunc 文檔。
- y: ndarray
與 x 形狀相同的數組,包含 x 中每個元素的立方體 cube-root。如果提供了 out,則 y 是對它的引用。如果 x 是標量,則這是一個標量。
參數:
返回:
例子:
>>> np.cbrt([1,8,27]) array([ 1., 2., 3.])
相關用法
- Python numpy chararray.ndim用法及代碼示例
- Python numpy chebyshev.chebsub用法及代碼示例
- Python numpy chararray.nbytes用法及代碼示例
- Python numpy chebyshev.chebdiv用法及代碼示例
- Python numpy copy用法及代碼示例
- Python numpy chararray.setflags用法及代碼示例
- Python numpy chararray.flat用法及代碼示例
- Python numpy can_cast用法及代碼示例
- Python numpy chararray.strides用法及代碼示例
- Python numpy chebyshev.cheb2poly用法及代碼示例
- Python numpy chararray.view用法及代碼示例
- Python numpy chebyshev.chebx用法及代碼示例
- Python numpy chebyshev.chebmul用法及代碼示例
- Python numpy char.strip用法及代碼示例
- Python numpy c_用法及代碼示例
- Python numpy cross用法及代碼示例
- Python numpy chebyshev.chebroots用法及代碼示例
- Python numpy copysign用法及代碼示例
- Python numpy char.upper用法及代碼示例
- Python numpy chararray.imag用法及代碼示例
- Python numpy chararray.base用法及代碼示例
- Python numpy chararray.flatten用法及代碼示例
- Python numpy chararray.copy用法及代碼示例
- Python numpy clip用法及代碼示例
- Python numpy char.count用法及代碼示例
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.cbrt。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。