Javatpoint Logo
Javatpoint Logo

Numpy rint()

This function is used to round the array elements to the nearest integer.

Syntax

Parameters

  1. array: Array elements whose nearest integers are to be calculated.

Return

An array containing the rounded values is returned.

Example

Output:

Input array: [0.23, 0.09, 1.2, 1.24, 9.99]
Output array: [ 0.  0.  1.  1. 10.]

Next TopicNumpy tanh()




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA