Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.9k
Description
Describe the issue:
I just installed numpy 2.3.2 on top of python 3.11.11, compiled from source with intel oneapi 2024.2.1 compilers with
CC=icx CXX=icpx CFLAGS='-fveclib=none -fp-model=strict -march=skylake-avx512' FFLAGS='-fp-model=strict -march=skylake-avx512' CXXFLAGS='-fp-model=strict -march=skylake-avx512' python -m pip install --no-build-isolation -v . -Cbuild-dir=build -Csetup-args=-Dallow-noblas=false -Csetup-args=-Dblas-order=mkl -Csetup-args=-Dlapack-order=mkl -Csetup-args=-Dblas=mkl-dynamic-lp64-iomp -Csetup-args=-Dlapack=mkl-dynamic-lp64-iompNumpy test fails with the errors pasted below. This reminds me of the assertion errors I reported in#27111, which I just let be as recommended by others here. However, I'm not sure if the errors I see now canalso be just ignored or they point to something more serious.
Reproduce the code example:
python-c'import numpy; numpy.test()'
Error message:
_________________________________________________________________ TestFloatExceptions.test_floating_exceptions[G] __________________________________________________________________self =<test_numeric.TestFloatExceptions object at 0x1548c579ded0>, typecode ='G' @pytest.mark.skipif(IS_WASM, reason="no wasm fp exception support") @pytest.mark.parametrize("typecode", np.typecodes["AllFloat"]) def test_floating_exceptions(self, typecode):if'bsd'in sys.platform and typecodein'gG': pytest.skip(reason="Fallback impl for (c)longdouble may not raise""FPE errors as expected on BSD OSes,""see gh-24876, gh-23379")# Test basic arithmetic function errors with np.errstate(all='raise'): ftype = obj2sctype(typecode)if np.dtype(ftype).kind =='f':# Get some extreme values for the typefi = np.finfo(ftype) ft_tiny = fi._machar.tiny ft_max = fi.max ft_eps = fi.eps underflow ='underflow' divbyzero ='divide by zero' else:# 'c', complex, corresponding real dtype rtype = type(ftype(0).real)fi = np.finfo(rtype) ft_tiny = ftype(fi._machar.tiny) ft_max = ftype(fi.max) ft_eps = ftype(fi.eps)# The complex types raise different exceptions underflow ='' divbyzero ='' overflow ='overflow' invalid ='invalid'# The value of tiny for double double is NaN, so we need to# pass the assertif not np.isnan(ft_tiny): self.assert_raises_fpe(underflow, lambda a, b: a / b, ft_tiny, ft_max) self.assert_raises_fpe(underflow, lambda a, b: a* b, ft_tiny, ft_tiny) self.assert_raises_fpe(overflow, lambda a, b: a* b, ft_max, ftype(2)) self.assert_raises_fpe(overflow, lambda a, b: a / b, ft_max, ftype(0.5)) self.assert_raises_fpe(overflow, lambda a, b: a + b, ft_max, ft_max* ft_eps) self.assert_raises_fpe(overflow, lambda a, b: a - b, -ft_max, ft_max* ft_eps)> self.assert_raises_fpe(overflow, np.power, ftype(2), ftype(2**fi.nexp))divbyzero =''fi = finfo(resolution=1e-18, min=-1.189731495357231765e+4932, max=1.189731495357231765e+4932, dtype=float128)ft_eps = np.clongdouble('1.084202172485504434e-19+0j')ft_max = np.clongdouble('1.189731495357231765e+4932+0j')ft_tiny = np.clongdouble('3.3621031431120935063e-4932+0j')ftype =<class'numpy.clongdouble'>invalid ='invalid'overflow ='overflow'rtype =<class'numpy.longdouble'>self =<test_numeric.TestFloatExceptions object at 0x1548c579ded0>typecode ='G'underflow =''../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_numeric.py:1045:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self =<test_numeric.TestFloatExceptions object at 0x1548c579ded0>, fpeerr ='overflow', flop =<ufunc'power'>, x = np.clongdouble('2+0j'), y = np.clongdouble('32768+0j') def assert_raises_fpe(self, fpeerr, flop, x, y): ftype = type(x) try: flop(x, y)> assert_(False, f"Type {ftype} did not raise fpe error '{fpeerr}'.")E AssertionError: Type<class'numpy.clongdouble'> did not raise fpe error'overflow'.flop =<ufunc'power'>fpeerr ='overflow'ftype =<class'numpy.clongdouble'>self =<test_numeric.TestFloatExceptions object at 0x1548c579ded0>x = np.clongdouble('2+0j')y = np.clongdouble('32768+0j')../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_numeric.py:979: AssertionError____________________________________________________________________ TestRemainder.test_float_divmod_errors[d] _____________________________________________________________________self =<test_umath.TestRemainder object at 0x1548c324e110>, dtype ='d' @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) def test_float_divmod_errors(self, dtype):# Check valid errors raised for divmod and remainder fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# since divmod is combination of both remainder and divide# ops it will set both dividebyzero and invalid flags with np.errstate(divide='raise', invalid='ignore'): assert_raises(FloatingPointError, np.divmod, fone, fzero) with np.errstate(divide='ignore', invalid='raise'): assert_raises(FloatingPointError, np.divmod, fone, fzero) with np.errstate(invalid='raise'): assert_raises(FloatingPointError, np.divmod, fzero, fzero) with np.errstate(invalid='raise'):> assert_raises(FloatingPointError, np.divmod, finf, finf)dtype ='d'finf = array(inf)fnan = array(nan)fone = array(1.)fzero = array(0.)self =<test_umath.TestRemainder object at 0x1548c324e110>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:813:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../python/3.11.11/lib/python3.11/unittest/case.py:766:in assertRaisesreturn context.handle('assertRaises', args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ args = (<ufunc'divmod'>, array(inf), array(inf)) context = None expected_exception =<class'FloatingPointError'> kwargs = {} self =<numpy.testing._private.utils._Dummy testMethod=nop>../python/3.11.11/lib/python3.11/unittest/case.py:236:in handle with self: args = [array(inf), array(inf)] callable_obj =<ufunc'divmod'> kwargs = {} name ='assertRaises' self = None../python/3.11.11/lib/python3.11/unittest/case.py:259:in __exit__ self._raiseFailure("{} not raised by {}".format(exc_name, exc_name ='FloatingPointError' exc_type = None exc_value = None self =<unittest.case._AssertRaisesContext object at 0x1548b28e5a50> tb = None_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self =<unittest.case._AssertRaisesContext object at 0x1548b28e5a50>, standardMsg ='FloatingPointError not raised by divmod' def _raiseFailure(self, standardMsg): msg = self.test_case._formatMessage(self.msg, standardMsg)> raise self.test_case.failureException(msg)E AssertionError: FloatingPointError not raised by divmodmsg ='FloatingPointError not raised by divmod'self =<unittest.case._AssertRaisesContext object at 0x1548b28e5a50>standardMsg ='FloatingPointError not raised by divmod'../python/3.11.11/lib/python3.11/unittest/case.py:199: AssertionError____________________________________________________________________ TestRemainder.test_float_divmod_errors[g] _____________________________________________________________________self =<test_umath.TestRemainder object at 0x1548c324df50>, dtype ='g' @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) def test_float_divmod_errors(self, dtype):# Check valid errors raised for divmod and remainder fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# since divmod is combination of both remainder and divide# ops it will set both dividebyzero and invalid flags with np.errstate(divide='raise', invalid='ignore'): assert_raises(FloatingPointError, np.divmod, fone, fzero) with np.errstate(divide='ignore', invalid='raise'):> assert_raises(FloatingPointError, np.divmod, fone, fzero)dtype ='g'finf = array(inf, dtype=float128)fnan = array(nan, dtype=float128)fone = array(1., dtype=float128)fzero = array(0., dtype=float128)self =<test_umath.TestRemainder object at 0x1548c324df50>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:809:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../python/3.11.11/lib/python3.11/unittest/case.py:766:in assertRaisesreturn context.handle('assertRaises', args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ args = (<ufunc'divmod'>, array(1., dtype=float128), array(0., dtype=float128)) context = None expected_exception =<class'FloatingPointError'> kwargs = {} self =<numpy.testing._private.utils._Dummy testMethod=nop>../python/3.11.11/lib/python3.11/unittest/case.py:236:in handle with self: args = [array(1., dtype=float128), array(0., dtype=float128)] callable_obj =<ufunc'divmod'> kwargs = {} name ='assertRaises' self = None../python/3.11.11/lib/python3.11/unittest/case.py:259:in __exit__ self._raiseFailure("{} not raised by {}".format(exc_name, exc_name ='FloatingPointError' exc_type = None exc_value = None self =<unittest.case._AssertRaisesContext object at 0x1548b142b0d0> tb = None_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self =<unittest.case._AssertRaisesContext object at 0x1548b142b0d0>, standardMsg ='FloatingPointError not raised by divmod' def _raiseFailure(self, standardMsg): msg = self.test_case._formatMessage(self.msg, standardMsg)> raise self.test_case.failureException(msg)E AssertionError: FloatingPointError not raised by divmodmsg ='FloatingPointError not raised by divmod'self =<unittest.case._AssertRaisesContext object at 0x1548b142b0d0>standardMsg ='FloatingPointError not raised by divmod'../python/3.11.11/lib/python3.11/unittest/case.py:199: AssertionError________________________________________________________________ TestRemainder.test_float_remainder_errors[fmod-e] _________________________________________________________________self =<test_umath.TestRemainder object at 0x1548c324c0d0>, dtype ='e', fn =<ufunc'fmod'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'): with pytest.raises(FloatingPointError, match="invalid value"):> fn(fone, fzero)E FloatingPointError: divide by zero encounteredin fmoddtype ='e'finf = array(inf, dtype=float16)fn =<ufunc'fmod'>fnan = array(nan, dtype=float16)fone = array(1., dtype=float16)fzero = array(0., dtype=float16)self =<test_umath.TestRemainder object at 0x1548c324c0d0>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:838: FloatingPointErrorDuring handling of the above exception, another exception occurred:self =<test_umath.TestRemainder object at 0x1548c324c0d0>, dtype ='e', fn =<ufunc'fmod'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'):> with pytest.raises(FloatingPointError, match="invalid value"):E AssertionError: Regex pattern did not match.E Regex:'invalid value'E Input:'divide by zero encountered in fmod'dtype ='e'finf = array(inf, dtype=float16)fn =<ufunc'fmod'>fnan = array(nan, dtype=float16)fone = array(1., dtype=float16)fzero = array(0., dtype=float16)self =<test_umath.TestRemainder object at 0x1548c324c0d0>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:836: AssertionError________________________________________________________________ TestRemainder.test_float_remainder_errors[fmod-f] _________________________________________________________________self =<test_umath.TestRemainder object at 0x1548c3243e50>, dtype ='f', fn =<ufunc'fmod'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'): with pytest.raises(FloatingPointError, match="invalid value"):> fn(fone, fzero)E FloatingPointError: divide by zero encounteredin fmoddtype ='f'finf = array(inf, dtype=float32)fn =<ufunc'fmod'>fnan = array(nan, dtype=float32)fone = array(1., dtype=float32)fzero = array(0., dtype=float32)self =<test_umath.TestRemainder object at 0x1548c3243e50>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:838: FloatingPointErrorDuring handling of the above exception, another exception occurred:self =<test_umath.TestRemainder object at 0x1548c3243e50>, dtype ='f', fn =<ufunc'fmod'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'):> with pytest.raises(FloatingPointError, match="invalid value"):E AssertionError: Regex pattern did not match.E Regex:'invalid value'E Input:'divide by zero encountered in fmod'dtype ='f'finf = array(inf, dtype=float32)fn =<ufunc'fmod'>fnan = array(nan, dtype=float32)fone = array(1., dtype=float32)fzero = array(0., dtype=float32)self =<test_umath.TestRemainder object at 0x1548c3243e50>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:836: AssertionError________________________________________________________________ TestRemainder.test_float_remainder_errors[fmod-g] _________________________________________________________________self =<test_umath.TestRemainder object at 0x1548c3243890>, dtype ='g', fn =<ufunc'fmod'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'):> with pytest.raises(FloatingPointError, match="invalid value"):E Failed: DID NOT RAISE<class'FloatingPointError'>dtype ='g'finf = array(inf, dtype=float128)fn =<ufunc'fmod'>fnan = array(nan, dtype=float128)fone = array(1., dtype=float128)fzero = array(0., dtype=float128)self =<test_umath.TestRemainder object at 0x1548c3243890>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:836: Failed______________________________________________________________ TestRemainder.test_float_remainder_errors[remainder-e] ______________________________________________________________self =<test_umath.TestRemainder object at 0x1548c32435d0>, dtype ='e', fn =<ufunc'remainder'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'): with pytest.raises(FloatingPointError, match="invalid value"):> fn(fone, fzero)E FloatingPointError: divide by zero encounteredin remainderdtype ='e'finf = array(inf, dtype=float16)fn =<ufunc'remainder'>fnan = array(nan, dtype=float16)fone = array(1., dtype=float16)fzero = array(0., dtype=float16)self =<test_umath.TestRemainder object at 0x1548c32435d0>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:838: FloatingPointErrorDuring handling of the above exception, another exception occurred:self =<test_umath.TestRemainder object at 0x1548c32435d0>, dtype ='e', fn =<ufunc'remainder'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'):> with pytest.raises(FloatingPointError, match="invalid value"):E AssertionError: Regex pattern did not match.E Regex:'invalid value'E Input:'divide by zero encountered in remainder'dtype ='e'finf = array(inf, dtype=float16)fn =<ufunc'remainder'>fnan = array(nan, dtype=float16)fone = array(1., dtype=float16)fzero = array(0., dtype=float16)self =<test_umath.TestRemainder object at 0x1548c32435d0>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:836: AssertionError______________________________________________________________ TestRemainder.test_float_remainder_errors[remainder-f] ______________________________________________________________self =<test_umath.TestRemainder object at 0x1548c3243310>, dtype ='f', fn =<ufunc'remainder'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'): with pytest.raises(FloatingPointError, match="invalid value"):> fn(fone, fzero)E FloatingPointError: divide by zero encounteredin remainderdtype ='f'finf = array(inf, dtype=float32)fn =<ufunc'remainder'>fnan = array(nan, dtype=float32)fone = array(1., dtype=float32)fzero = array(0., dtype=float32)self =<test_umath.TestRemainder object at 0x1548c3243310>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:838: FloatingPointErrorDuring handling of the above exception, another exception occurred:self =<test_umath.TestRemainder object at 0x1548c3243310>, dtype ='f', fn =<ufunc'remainder'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'):> with pytest.raises(FloatingPointError, match="invalid value"):E AssertionError: Regex pattern did not match.E Regex:'invalid value'E Input:'divide by zero encountered in remainder'dtype ='f'finf = array(inf, dtype=float32)fn =<ufunc'remainder'>fnan = array(nan, dtype=float32)fone = array(1., dtype=float32)fzero = array(0., dtype=float32)self =<test_umath.TestRemainder object at 0x1548c3243310>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:836: AssertionError______________________________________________________________ TestRemainder.test_float_remainder_errors[remainder-g] ______________________________________________________________self =<test_umath.TestRemainder object at 0x1548c3242a50>, dtype ='g', fn =<ufunc'remainder'> @pytest.mark.skipif(hasattr(np.__config__,"blas_ssl2_info"), reason="gh-22982") @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm") @pytest.mark.xfail(sys.platform.startswith("darwin"), reason="MacOS seems to not give the correct 'invalid' warning for""`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): fzero = np.array(0.0, dtype=dtype) fone = np.array(1.0, dtype=dtype) finf = np.array(np.inf, dtype=dtype) fnan = np.array(np.nan, dtype=dtype)# The following already contain a NaN and should not warn. with np.errstate(all='raise'):> with pytest.raises(FloatingPointError, match="invalid value"):E Failed: DID NOT RAISE<class'FloatingPointError'>dtype ='g'finf = array(inf, dtype=float128)fn =<ufunc'remainder'>fnan = array(nan, dtype=float128)fone = array(1., dtype=float128)fzero = array(0., dtype=float128)self =<test_umath.TestRemainder object at 0x1548c3242a50>../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:836: Failed___________________________________________________________________________ TestClog.test_special_values ___________________________________________________________________________self =<test_umath_complex.TestClog object at 0x1548c2f81b90> @platform_skip@pytest.mark.skipif(platform.machine() =="armv5tel", reason="See gh-413.") def test_special_values(self): xl = [] yl = []# From C99 std (Sec 6.3.2)# XXX: check exceptions raised# --- raise for invalid fails.# clog(-0 + i0) returns -inf + i pi and raises the 'divide-by-zero'# floating-point exception. with np.errstate(divide='raise'): x = np.array([ncu.NZERO], dtype=complex) y = complex(-np.inf, np.pi)> assert_raises(FloatingPointError, np.log, x)self =<test_umath_complex.TestClog object at 0x1548c2f81b90>x = array([-0.+0.j])xl = []y = (-inf+3.141592653589793j)yl = []../python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath_complex.py:158:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../python/3.11.11/lib/python3.11/unittest/case.py:766:in assertRaisesreturn context.handle('assertRaises', args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ args = (<ufunc'log'>, array([-0.+0.j])) context = None expected_exception =<class'FloatingPointError'> kwargs = {} self =<numpy.testing._private.utils._Dummy testMethod=nop>../python/3.11.11/lib/python3.11/unittest/case.py:236:in handle with self: args = [array([-0.+0.j])] callable_obj =<ufunc'log'> kwargs = {} name ='assertRaises' self = None../python/3.11.11/lib/python3.11/unittest/case.py:259:in __exit__ self._raiseFailure("{} not raised by {}".format(exc_name, exc_name ='FloatingPointError' exc_type = None exc_value = None self =<unittest.case._AssertRaisesContext object at 0x1547dcab9390> tb = None_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self =<unittest.case._AssertRaisesContext object at 0x1547dcab9390>, standardMsg ='FloatingPointError not raised by log' def _raiseFailure(self, standardMsg): msg = self.test_case._formatMessage(self.msg, standardMsg)> raise self.test_case.failureException(msg)E AssertionError: FloatingPointError not raised by logmsg ='FloatingPointError not raised by log'self =<unittest.case._AssertRaisesContext object at 0x1547dcab9390>standardMsg ='FloatingPointError not raised by log'../python/3.11.11/lib/python3.11/unittest/case.py:199: AssertionError________________________________________________________________________________ TestKind.test_int _________________________________________________________________________________self =<numpy.f2py.tests.test_kind.TestKind object at 0x1548c243a710> @pytest.mark.skipif(sys.maxsize< 2** 31 + 1, reason="Fails for 32 bit machines") def test_int(self):"""Test`int` kind_func for integers up to 10**40.""" selectedintkind = self.module.selectedintkindforiin range(40):> assert selectedintkind(i) == selected_int_kind( i ), f"selectedintkind({i}): expected {selected_int_kind(i)!r} but got {selectedintkind(i)!r}"E AssertionError: selectedintkind(19): expected 16 but got -1E assert -1 == 16E + where -1 =<fortranfunctionselectedintkind>(19)E + and 16 = selected_int_kind(19)i = 19selectedintkind =<fortranfunctionselectedintkind>self =<numpy.f2py.tests.test_kind.TestKind object at 0x1548c243a710>../python/3.11.11/lib/python3.11/site-packages/numpy/f2py/tests/test_kind.py:26: AssertionError________________________________________________________________________________ TestKind.test_real ________________________________________________________________________________self =<numpy.f2py.tests.test_kind.TestKind object at 0x1548c2340e90> def test_real(self):""" Test (processor-dependent)`real` kind_func for real numbers of up to 31 digits precision (extended/quadruple).""" selectedrealkind = self.module.selectedrealkindforiin range(32):> assert selectedrealkind(i) == selected_real_kind( i ), f"selectedrealkind({i}): expected {selected_real_kind(i)!r} but got {selectedrealkind(i)!r}"E AssertionError: selectedrealkind(16): expected 10 but got 16E assert 16 == 10E + where 16 =<fortranfunctionselectedrealkind>(16)E + and 10 = selected_real_kind(16)i = 16selectedrealkind =<fortranfunctionselectedrealkind>self =<numpy.f2py.tests.test_kind.TestKind object at 0x1548c2340e90>../python/3.11.11/lib/python3.11/site-packages/numpy/f2py/tests/test_kind.py:38: AssertionError================================================================================= warnings summary =================================================================================../python/3.11.11/lib/python3.11/site-packages/setuptools/_distutils/msvccompiler.py:66 /work2/noaa/co2/sbasu/packages/python/3.11.11/lib/python3.11/site-packages/setuptools/_distutils/msvccompiler.py:66: DeprecationWarning: msvccompiler is deprecated and slated to be removedin the future. Please discontinue use or file an issue with pypa/distutils describing your use case. warnings.warn(_core/tests/test_umath.py::TestRemainder::test_float_remainder_corner_cases /work2/noaa/co2/sbasu/packages/python/3.11.11/lib/python3.11/site-packages/numpy/_core/tests/test_umath.py:910: RuntimeWarning: divide by zero encounteredin remainder rem = np.remainder(fone, fzer)distutils/tests/test_fcompiler_gnu.py: 10 warnings /work2/noaa/co2/sbasu/packages/python/3.11.11/lib/python3.11/site-packages/numpy/distutils/fcompiler/gnu.py:276: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.if LooseVersion(v)>="4":distutils/tests/test_fcompiler_gnu.py: 10 warnings /work2/noaa/co2/sbasu/packages/python/3.11.11/lib/python3.11/site-packages/setuptools/_distutils/version.py:346: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. other = LooseVersion(other)-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html============================================================================= shorttest summary info ==============================================================================FAILED _core/tests/test_numeric.py::TestFloatExceptions::test_floating_exceptions[G] - AssertionError: Type<class'numpy.clongdouble'> did not raise fpe error'overflow'.FAILED _core/tests/test_umath.py::TestRemainder::test_float_divmod_errors[d] - AssertionError: FloatingPointError not raised by divmodFAILED _core/tests/test_umath.py::TestRemainder::test_float_divmod_errors[g] - AssertionError: FloatingPointError not raised by divmodFAILED _core/tests/test_umath.py::TestRemainder::test_float_remainder_errors[fmod-e] - AssertionError: Regex pattern did not match.FAILED _core/tests/test_umath.py::TestRemainder::test_float_remainder_errors[fmod-f] - AssertionError: Regex pattern did not match.FAILED _core/tests/test_umath.py::TestRemainder::test_float_remainder_errors[fmod-g] - Failed: DID NOT RAISE<class'FloatingPointError'>FAILED _core/tests/test_umath.py::TestRemainder::test_float_remainder_errors[remainder-e] - AssertionError: Regex pattern did not match.FAILED _core/tests/test_umath.py::TestRemainder::test_float_remainder_errors[remainder-f] - AssertionError: Regex pattern did not match.FAILED _core/tests/test_umath.py::TestRemainder::test_float_remainder_errors[remainder-g] - Failed: DID NOT RAISE<class'FloatingPointError'>FAILED _core/tests/test_umath_complex.py::TestClog::test_special_values - AssertionError: FloatingPointError not raised by logFAILED f2py/tests/test_kind.py::TestKind::test_int - AssertionError: selectedintkind(19): expected 16 but got -1FAILED f2py/tests/test_kind.py::TestKind::test_real - AssertionError: selectedrealkind(16): expected 10 but got 1612 failed, 45404 passed, 335 skipped, 2820 deselected, 33 xfailed, 5 xpassed, 22 warningsin 491.86s (0:08:11)
Python and NumPy Versions:
python -c 'import sys,numpy; print(sys.version) ; print(numpy.__version__)'3.11.11 (main, Sep 9 2025, 10:29:54) [Clang 19.0.0 (icx 2024.2.1.20240711)]2.3.2Runtime Environment:
[{'numpy_version': '2.3.2',
'python': '3.11.11 (main, Sep 9 2025, 10:29:54) [Clang 19.0.0 (icx '
'2024.2.1.20240711)]',
'uname': uname_result(system='Linux', node='orion-login-3.hpc.msstate.edu', release='5.14.0-162.23.1.el9_1.x86_64', version='#1 SMP PREEMPT_DYNAMIC Tue Apr 11 19:09:37 UTC 2023', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE',
'SSE2',
'SSE3',
'SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_SKX'],
'found': [],
'not_found': ['AVX512_KNL',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL']}},
{'filepath': '/apps/spack-managed-skylake_avx512-v1.0/gcc-11.3.1/intel-oneapi-compilers-2024.2.1-at2u4flm6j2vvnwqgttej7jnni7d4vd4/compiler/2024.2/lib/libiomp5.so',
'internal_api': 'openmp',
'num_threads': 80,
'prefix': 'libiomp',
'user_api': 'openmp',
'version': None}]
Context for the issue:
No response