diff options
author | Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> | 2021-02-28 03:31:51 +0100 |
---|---|---|
committer | Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> | 2021-03-01 23:29:08 +0100 |
commit | 4f3aa0018b2a9adceddc5eb5361a2f09af759b06 (patch) | |
tree | 9382875b42d9bf13cce9496113f07f82b1468ee8 /numpy | |
parent | 1932e4bdc460975d8b35ae8351e037d26e5ee6f8 (diff) | |
download | numpy-4f3aa0018b2a9adceddc5eb5361a2f09af759b06.tar.gz |
DOC: trunc, floor, ceil, rint, fix should all link to each other in see also
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/code_generators/ufunc_docstrings.py | 15 | ||||
-rw-r--r-- | numpy/lib/ufunclike.py | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py index 2f75cb41f..bb9540755 100644 --- a/numpy/core/code_generators/ufunc_docstrings.py +++ b/numpy/core/code_generators/ufunc_docstrings.py @@ -781,7 +781,7 @@ add_newdoc('numpy.core.umath', 'ceil', See Also -------- - floor, trunc, rint + floor, trunc, rint, fix Examples -------- @@ -813,7 +813,7 @@ add_newdoc('numpy.core.umath', 'trunc', See Also -------- - ceil, floor, rint + ceil, floor, rint, fix Notes ----- @@ -1374,13 +1374,14 @@ add_newdoc('numpy.core.umath', 'floor', See Also -------- - ceil, trunc, rint + ceil, trunc, rint, fix Notes ----- - Some spreadsheet programs calculate the "floor-towards-zero", in other - words ``floor(-2.5) == -2``. NumPy instead uses the definition of - `floor` where `floor(-2.5) == -3`. + Other than the NumPy ``floor`` function, which always rounds down, the + FLOOR function in common spreadsheet programs calculates the + "floor-towards-zero", i.e. ``FLOOR(-2.5) == -2``. This "floor-towards-zero" + function is called ``fix`` in NumPy. Examples -------- @@ -3486,7 +3487,7 @@ add_newdoc('numpy.core.umath', 'rint', See Also -------- - ceil, floor, trunc + fix, ceil, floor, trunc Examples -------- diff --git a/numpy/lib/ufunclike.py b/numpy/lib/ufunclike.py index 0956de82b..a93c4773b 100644 --- a/numpy/lib/ufunclike.py +++ b/numpy/lib/ufunclike.py @@ -100,7 +100,7 @@ def fix(x, out=None): See Also -------- - trunc, floor, ceil + rint, trunc, floor, ceil around : Round to given number of decimals Examples |