true_divide#
- class brainunit.math.true_divide(x, y, **kwargs)#
Return a true division of the inputs, element-wise.
Equivalent to
divide. The resulting unit isx.unit / y.unit.- Parameters:
x (saiunit.Quantity |
Array|ndarray|number|bool) – Dividend array.y (saiunit.Quantity |
Array|ndarray|number|bool) – Divisor array. Ifx.shape != y.shape, they must be broadcastable to a common shape.
- Returns:
out – The quotient
x / y, element-wise. This is a scalar if both x and y are scalars. The resulting unit isx.unit / y.unit.- Return type:
saiunit.Quantity |
Array|ndarray|number|bool
Examples
>>> import saiunit as u >>> a = u.math.array([10.0, 20.0]) * u.meter >>> b = u.math.array([2.0, 5.0]) * u.second >>> u.math.true_divide(a, b) # unit is meter / second