MCPcopy Create free account
hub / github.com/numpy/numpy / assert_op_raises_fpe

Method assert_op_raises_fpe

numpy/core/tests/test_numeric.py:639–649  ·  view source on GitHub ↗
(self, fpeerr, flop, sc1, sc2)

Source from the content-addressed store, hash-verified

637 "Type %s raised wrong fpe error '%s'." % (ftype, exc))
638
639 def assert_op_raises_fpe(self, fpeerr, flop, sc1, sc2):
640 # Check that fpe exception is raised.
641 #
642 # Given a floating operation `flop` and two scalar values, check that
643 # the operation raises the floating point exception specified by
644 # `fpeerr`. Tests all variants with 0-d array scalars as well.
645
646 self.assert_raises_fpe(fpeerr, flop, sc1, sc2)
647 self.assert_raises_fpe(fpeerr, flop, sc1[()], sc2)
648 self.assert_raises_fpe(fpeerr, flop, sc1, sc2[()])
649 self.assert_raises_fpe(fpeerr, flop, sc1[()], sc2[()])
650
651 # Test for all real and complex float types
652 @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