### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Mathematical functions »

# numpy.rint

`numpy.``rint`(x[, out])

  Round elements of the array to the nearest integer.

  Parameters: | x : array_like Input array.
  Returns: | out : ndarray Output array is same shape and type as x.

  Examples

      >>> a = [-4.1, -3.6, -2.5, 0.1, 2.5, 3.1, 3.9]
      >>> np.rint(a)
      array([-4., -4., -2.,  0.,  2.,  3.,  4.])

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Mathematical functions »