8000 Merge pull request #14805 from eric-wieser/no-Fractions-from-np-scalars · numpy/numpy@cadb066 · GitHub
[go: up one dir, main page]

Skip to content

Commit cadb066

Browse files
authored
Merge pull request #14805 from eric-wieser/no-Fractions-from-np-scalars
TST: Don't construct Fraction instances from numpy scalars
2 parents 94a2ec0 + d863484 commit cadb066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/lib/tests/test_function_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,7 @@ def test_basic(self):
25232523
assert_equal(np.percentile(x, 0, interpolation='nearest'), np.nan)
25242524

25252525
def test_fraction(self):
2526-
x = [Fraction(i, 2) for i in np.arange(8)]
2526+
x = [Fraction(i, 2) for i in range(8)]
25272527

25282528
p = np.percentile(x, Fraction(0))
25292529
assert_equal(p, Fraction(0))
@@ -2943,7 +2943,7 @@ def test_basic(self):
29432943

29442944
def test_fraction(self):
29452945
# fractional input, integral quantile
2946-
x = [Fraction(i, 2) for i in np.arange(8)]
2946+
x = [Fraction(i, 2) for i in range(8)]
29472947

29482948
q = np.quantile(x, 0)
29492949
assert_equal(q, 0)

0 commit comments

Comments
 (0)
0