summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorchristos val <cv1038@wildcats.unh.edu>2021-03-16 18:15:09 -0400
committerchristos val <cv1038@wildcats.unh.edu>2021-03-16 18:15:09 -0400
commiteeba278c401dea4f38d92897ced61ec49775def4 (patch)
tree0cf11b0e5f6beaa42e5510625b2b916a1abb91ee /numpy
parent8e58398c0e0d723af1cb566a26fbcf1cc8bb8ae3 (diff)
downloadnumpy-eeba278c401dea4f38d92897ced61ec49775def4.tar.gz
add note to rint docstrings
Diffstat (limited to 'numpy')
-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])