trunc

Contents

trunc#

class saiunit.math.trunc(x, **kwargs)#

Return the truncated value of the argument.

Parameters:

x (Union[saiunit.Quantity, Array, ndarray, number, bool]) – Input array.

Returns:

out – Truncated values. Quantity if x is a Quantity.

Return type:

Union[Array, saiunit.Quantity]

Examples

>>> import saiunit as u
>>> a = [1.7, -2.3, 3.9] * u.meter
>>> u.math.trunc(a)