mxnet.ndarray.sparse.rint¶
-
mxnet.ndarray.sparse.rint(data=None, out=None, name=None, **kwargs)¶ Returns element-wise rounded value to the nearest integer of the input.
Note
For input
n.5rintreturnsnwhileroundreturnsn+1.For input
-n.5bothrintandroundreturns-n-1.
Example:
rint([-1.5, 1.5, -1.9, 1.9, 2.1]) = [-2., 1., -2., 2., 2.]
The storage type of
rintoutput 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