summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorMax Kellermeier <max.kellermeier@hotmail.de>2020-08-21 22:55:29 +0200
committerMax Kellermeier <max.kellermeier@hotmail.de>2020-08-21 22:55:29 +0200
commit00dcda244bc1eb58cb3b4f30c7b18a71a8569194 (patch)
treeb04c853e60ae1b4a0b7d4cece2061ec0fe6bfca9 /numpy/lib/tests/test_function_base.py
parent3da050660f2140ae387d67218f457442f89fe94e (diff)
downloadnumpy-00dcda244bc1eb58cb3b4f30c7b18a71a8569194.tar.gz
Updated incorrect argument in tests. boundary correction for int and float.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 44ff7ea81..2ebde9aec 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1759,20 +1759,21 @@ class TestUnwrap:
def test_period(self):
# check that unwrap removes jumps greater that 255
- assert_array_equal(unwrap([1, 1 + 256], interval_size=255), [1, 2])
+ assert_array_equal(unwrap([1, 1 + 256], period=255), [1, 2])
# check that unwrap maintains continuity
- assert_(np.all(diff(unwrap(rand(10) * 1000, interval_size=255)) < 255))
+ assert_(np.all(diff(unwrap(rand(10) * 1000, period=255)) < 255))
# check simple case
simple_seq = np.array([0, 75, 150, 225, 300])
wrap_seq = np.mod(simple_seq, 255)
- assert_array_equal(unwrap(wrap_seq, interval_size=255), simple_seq)
+ assert_array_equal(unwrap(wrap_seq, period=255), simple_seq)
# check custom discont value
uneven_seq = np.array([0, 75, 150, 225, 300, 430])
wrap_uneven = np.mod(uneven_seq, 250)
- no_discont = unwrap(wrap_uneven, interval_size=250)
+ no_discont = unwrap(wrap_uneven, period=250)
assert_array_equal(no_discont, [0, 75, 150, 225, 300, 180])
- sm_discont = unwrap(wrap_uneven, interval_size=250, discont=140)
+ sm_discont = unwrap(wrap_uneven, period=250, discont=140)
assert_array_equal(sm_discont, [0, 75, 150, 225, 300, 430])
+ assert sm_discont.dtype == wrap_uneven.dtype
class TestFilterwindows: