scipy.special.cbrt#

scipy.special.cbrt(x, out=None) = <ufunc 'cbrt'>#

Element-wise cube root of x.

Parameters:
xarray_like

x must contain real numbers.

outndarray, optional

Optional output array for the function values

Returns:
scalar or ndarray

The cube root of each value in x.

Notes

Array API Standard Support

cbrt has support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

n/a

CuPy

n/a

PyTorch

JAX

Dask

n/a

See Support for the array API standard for more information.

Examples

>>> from scipy.special import cbrt
>>> cbrt(8)
2.0
>>> cbrt([-8, -3, 0.125, 1.331])
array([-2.        , -1.44224957,  0.5       ,  1.1       ])