Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 12923c2

Browse files
committed
TST: skip coverage of large elements in sincos_float32 for ancient glibc
Fixes #15179
1 parent 56268d5 commit 12923c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numpy/core/tests/test_umath.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,8 +1398,10 @@ def test_sincos_float32(self):
13981398
M = np.int_(N/20)
13991399
index = np.random.randint(low=0, high=N, size=M)
14001400
x_f32 = np.float32(np.random.uniform(low=-100.,high=100.,size=N))
1401-
# test coverage for elements > 117435.992f for which glibc is used
1402-
x_f32[index] = np.float32(10E+10*np.random.rand(M))
1401+
if not glibc_older_than_2_17:
1402+
# test coverage for elements > 117435.992f for which glibc is used
1403+
# this is known to be problematic on old glibc, so skip it there
1404+
x_f32[index] = np.float32(10E+10*np.random.rand(M))
14031405
x_f64 = np.float64(x_f32)
14041406
assert_array_max_ulp(np.sin(x_f32), np.float32(np.sin(x_f64)), maxulp=2)
14051407
assert_array_max_ulp(np.cos(x_f32), np.float32(np.cos(x_f64)), maxulp=2)

0 commit comments

Comments
 (0)