diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-08-27 10:31:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 10:31:38 -0600 |
commit | 3eb81a7578d07aa1c94026816101a7e16b8e257a (patch) | |
tree | fdda8ef58f449b0e1ba327d720fe81ec1ad78b17 /numpy | |
parent | c6ac4dab50dad3ee0936fb4b765cf4f441874d33 (diff) | |
parent | db76197e016481e1ce63a7588445c16cc4e1d0a0 (diff) | |
download | numpy-3eb81a7578d07aa1c94026816101a7e16b8e257a.tar.gz |
Merge pull request #19764 from Illviljan/around_docstring_test
BUG: np.around fails when using doctest
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/fromnumeric.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 764377bc9..ff082b644 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -3327,11 +3327,11 @@ def around(a, decimals=0, out=None): Examples -------- >>> np.around([0.37, 1.64]) - array([0., 2.]) + array([0., 2.]) >>> np.around([0.37, 1.64], decimals=1) - array([0.4, 1.6]) + array([0.4, 1.6]) >>> np.around([.5, 1.5, 2.5, 3.5, 4.5]) # rounds to nearest even value - array([0., 2., 2., 4., 4.]) + array([0., 2., 2., 4., 4.]) >>> np.around([1,2,3,11], decimals=1) # ndarray of ints is returned array([ 1, 2, 3, 11]) >>> np.around([1,2,3,11], decimals=-1) |