rint

Contents

rint#

class brainunit.math.rint(x, **kwargs)#

Round an array to the nearest integer.

Parameters:

x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Input array.

Returns:

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

Return type:

saiunit.Quantity | Array

Examples

>>> import saiunit as u
>>> a = [1.2, 2.7, 3.1] * u.meter
>>> u.math.rint(a)