summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-03-16 17:04:04 -0600
committerGitHub <noreply@github.com>2021-03-16 17:04:04 -0600
commit9ea0ca93655e11065a360b97baad3d11eb599ddd (patch)
tree0cf11b0e5f6beaa42e5510625b2b916a1abb91ee
parent8e58398c0e0d723af1cb566a26fbcf1cc8bb8ae3 (diff)
parenteeba278c401dea4f38d92897ced61ec49775def4 (diff)
downloadnumpy-9ea0ca93655e11065a360b97baad3d11eb599ddd.tar.gz
Merge pull request #18630 from chrisvalx/rint-docstrings
DOC: add note to numpy.rint() docstrings
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index a9dbbf92e..5026bfae8 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -3489,6 +3489,12 @@ add_newdoc('numpy.core.umath', 'rint',
--------
fix, ceil, floor, trunc
+ Notes
+ -----
+ For values exactly halfway between rounded decimal values, NumPy
+ rounds to the nearest even value. Thus 1.5 and 2.5 round to 2.0,
+ -0.5 and 0.5 round to 0.0, etc.
+
Examples
--------
>>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0])