cbrt#
- class brainunit.math.cbrt(x, **kwargs)#
Compute the cube root of each element.
When the input carries a unit, the resulting unit is the cube root of that unit (e.g.
meter ** 3becomesmeter).- Parameters:
x (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – The values whose cube-roots are required.- Returns:
y – An array of the same shape as x, containing the cube root of each element. If x carries a unit, the result is a Quantity whose unit is
x.unit ** (1/3).- Return type:
saiunit.Quantity |
Array
Examples
>>> import saiunit as u >>> q = u.math.array([8.0, 27.0]) * (u.meter ** 3) >>> u.math.cbrt(q) # Quantity with unit meter