Table Of Contents
Table Of Contents

mxnet.ndarray.sparse.round

mxnet.ndarray.sparse.round(data=None, out=None, name=None, **kwargs)

Returns element-wise rounded value to the nearest integer of the input.

Example:

round([-1.5, 1.5, -1.9, 1.9, 2.1]) = [-2.,  2., -2.,  2.,  2.]

The storage type of round output depends upon the input storage type:

  • round(default) = default

  • round(row_sparse) = row_sparse

  • round(csr) = csr

Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L714

Parameters
  • data (NDArray) – The input array.

  • out (NDArray, optional) – The output NDArray to hold the result.

Returns

out – The output of this function.

Return type

NDArray or list of NDArrays