MCPcopy
hub / github.com/numpy/numpy / assert_op_raises_fpe

Method assert_op_raises_fpe

numpy/_core/tests/test_numeric.py:968–978  ·  view source on GitHub ↗
(self, fpeerr, flop, sc1, sc2)

Source from the content-addressed store, hash-verified

966 f"Type {ftype} raised wrong fpe error '{exc}'.")
967
968 def assert_op_raises_fpe(self, fpeerr, flop, sc1, sc2):
969 # Check that fpe exception is raised.
970 #
971 # Given a floating operation `flop` and two scalar values, check that
972 # the operation raises the floating point exception specified by
973 # `fpeerr`. Tests all variants with 0-d array scalars as well.
974
975 self.assert_raises_fpe(fpeerr, flop, sc1, sc2)
976 self.assert_raises_fpe(fpeerr, flop, sc1[()], sc2)
977 self.assert_raises_fpe(fpeerr, flop, sc1, sc2[()])
978 self.assert_raises_fpe(fpeerr, flop, sc1[()], sc2[()])
979
980 # Test for all real and complex float types
981 @pytest.mark.skipif(IS_WASM, reason="no wasm fp exception support")

Callers

nothing calls this directly

Calls 1

assert_raises_fpeMethod · 0.95

Tested by

no test coverage detected