brainunit.math.modf

Contents

brainunit.math.modf#

brainunit.math.modf(x, **kwargs)#

Return the fractional and integer parts of the array elements.

Parameters:

x (Quantity | Array | ndarray | number | bool) – Input array.

Return type:

Tuple[saiunit.Quantity | Array, saiunit.Quantity | Array]

Returns:

The fractional and integral parts of the input, both with the same dimension.

Examples

>>> import saiunit as u
>>> a = [1.5, 2.7] * u.second
>>> frac, intg = u.math.modf(a)