diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-10-30 01:04:28 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-10-30 10:08:49 +0000 |
commit | d8634841223de7c482dcc6fdd5da34a79e220fe9 (patch) | |
tree | 15ba4220aa6cab030f6a59f0bb65792fc880dfe0 /numpy/lib/tests/test_function_base.py | |
parent | 6ed9365aadf992087b26ec30214dfec151ac22a1 (diff) | |
download | numpy-d8634841223de7c482dcc6fdd5da34a79e220fe9.tar.gz |
TST: Don't construct Fraction instances from numpy scalars
Fraction.__float__ gives a DeprecationWarning if the division results in a non-builtin float
This was never intended as part of the test anyway.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 1eae8ccfb..9075ff538 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -2523,7 +2523,7 @@ class TestPercentile(object): assert_equal(np.percentile(x, 0, interpolation='nearest'), np.nan) def test_fraction(self): - x = [Fraction(i, 2) for i in np.arange(8)] + x = [Fraction(i, 2) for i in range(8)] p = np.percentile(x, Fraction(0)) assert_equal(p, Fraction(0)) @@ -2943,7 +2943,7 @@ class TestQuantile(object): def test_fraction(self): # fractional input, integral quantile - x = [Fraction(i, 2) for i in np.arange(8)] + x = [Fraction(i, 2) for i in range(8)] q = np.quantile(x, 0) assert_equal(q, 0) |