mxnet.ndarray.rint¶
-
mxnet.ndarray.
rint
(data=None, out=None, name=None, **kwargs)¶ Returns element-wise rounded value to the nearest integer of the input.
Note
For input
n.5
rint
returnsn
whileround
returnsn+1
.For input
-n.5
bothrint
andround
returns-n-1
.
Example:
rint([-1.5, 1.5, -1.9, 1.9, 2.1]) = [-2., 1., -2., 2., 2.]
The storage type of
rint
output depends upon the input storage type:rint(default) = default
rint(row_sparse) = row_sparse
rint(csr) = csr
Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L735