summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermeier <max.kellermeier@hotmail.de>2020-08-23 17:19:02 +0200
committerMax Kellermeier <max.kellermeier@hotmail.de>2020-08-23 17:20:55 +0200
commitfde3fdb05eda00a4c84d6e52184c43928b320035 (patch)
treecdf31ec9576f0420df68f98d3985cb22f70177b2
parent8755c7f102363bee2572a08a5d9f83671af7957d (diff)
downloadnumpy-fde3fdb05eda00a4c84d6e52184c43928b320035.tar.gz
Minor corrections in unwrapping docstrings
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
-rw-r--r--doc/release/upcoming_changes/16987.improvement.rst4
-rw-r--r--numpy/lib/function_base.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/release/upcoming_changes/16987.improvement.rst b/doc/release/upcoming_changes/16987.improvement.rst
index e85fbda91..e25b2832f 100644
--- a/doc/release/upcoming_changes/16987.improvement.rst
+++ b/doc/release/upcoming_changes/16987.improvement.rst
@@ -9,8 +9,8 @@ intervals.
>>> phase_deg = np.mod(np.linspace(0,720,19), 360) - 180
>>> phase_deg
array([-180., -140., -100., -60., -20., 20., 60., 100., 140.,
- -180., -140., -100., -60., -20., 20., 60., 100., 140.,
- -180.])
+ -180., -140., -100., -60., -20., 20., 60., 100., 140.,
+ -180.])
>>> unwrap(phase_deg, period=360)
array([-180., -140., -100., -60., -20., 20., 60., 100., 140.,
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 4f0377efe..7c819eaf3 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1531,11 +1531,11 @@ def unwrap(p, discont=None, axis=-1, *, period=2*pi):
>>> np.unwrap(phase)
array([ 0. , 0.78539816, 1.57079633, -0.78539816, 0. ]) # may vary
>>> unwrap([0, 1, 2, -1, 0], period=4)
- array([0., 1., 2., 3., 4.])
+ array([0, 1, 2, 3, 4])
>>> unwrap([ 1, 2, 3, 4, 5, 6, 1, 2, 3], period=6)
- array([1., 2., 3., 4., 5., 6., 7., 8., 9.])
+ array([1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> unwrap([2, 3, 4, 5, 2, 3, 4, 5], period=4)
- array([2., 3., 4., 5., 6., 7., 8., 9.])
+ array([2, 3, 4, 5, 6, 7, 8, 9])
>>> phase_deg = np.mod(np.linspace(0,720,19), 360) - 180
>>> unwrap(phase_deg, period=360)
array([-180., -140., -100., -60., -20., 20., 60., 100., 140.,