Closed
Description
This test is failing on 64-bit Linux on the conda-forge Azure CI when building NumPy 1.18.0, see conda-forge/numpy-feedstock#179. Failed on Python 3.6, 3.7 and 3.8, so it's consistent. Not sure what's different about that setup, could be glibc version, compiler, or some Azure - TravisCI delta.
=================================== FAILURES ===================================
_______________ TestAVXFloat32Transcendental.test_sincos_float32 _______________
self = <numpy.core.tests.test_umath.TestAVXFloat32Transcendental object at 0x7f6a5342e080>
def test_sincos_float32(self):
np.random.seed(42)
N = 1000000
M = np.int_(N/20)
index = np.random.randint(low=0, high=N, size=M)
x_f32 = np.float32(np.random.uniform(low=-100.,high=100.,size=N))
# test coverage for elements > 117435.992f for which glibc is used
x_f32[index] = np.float32(10E+10*np.random.rand(M))
x_f64 = np.float64(x_f32)
> assert_array_max_ulp(np.sin(x_f32), np.float32(np.sin(x_f64)), maxulp=2)
E AssertionError: Arrays are not almost equal up to 2 ULP
This functionality came in in gh-13368, new in 1.18.0. Likely the accuracy is just slightly over 2 ULP, conda-forge tests need to be re-run with larger tolerance. (related: PR for improving the test function to show actual difference in gh-15178)
Cc @r-devulap