mxnet.np.fix

fix(x, out=None, **kwargs)

Round an array of floats element-wise to nearest integer towards zero. The rounded values are returned as floats.

Parameters
  • x (ndarray) – An array of floats to be rounded

  • out (ndarray, optional) – Output array

Returns

  • y (ndarray or scalar)

  • Returned array or scalar (y = -x. This is a scalar if x is a scalar.ndarray of floats)

Examples

>>> np.fix(3.14)
3