mindspore.numpy.cbrt

mindspore.numpy.cbrt(x, dtype=None)[源代码]

Returns the cube-root of a tensor, element-wise.

Note

Numpy arguments casting, order, subok, signature, and extobj are not supported.

Parameters
  • x (Tensor) – Input tensor.

  • dtype (mindspore.dtype, optional) – Defaults to None. Overrides the dtype of the output Tensor.

Returns

Tensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore.numpy as np
>>> a = np.asarray([1, -1, 3, -8, 64])
>>> output = np.cbrt(a)
>>> print(output)
[ 1.        -1.         1.4422495 -2.         4.       ]