本文简要介绍 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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。