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

Method test_failing_wrap

numpy/core/tests/test_umath.py:3099–3110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3097 assert_(type(ncu.exp(c) is C))
3098
3099 def test_failing_wrap(self):
3100
3101 class A:
3102 def __array__(self):
3103 return np.zeros(2)
3104
3105 def __array_wrap__(self, arr, context):
3106 raise RuntimeError
3107
3108 a = A()
3109 assert_raises(RuntimeError, ncu.maximum, a, a)
3110 assert_raises(RuntimeError, ncu.maximum.reduce, a)
3111
3112 def test_failing_out_wrap(self):
3113

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
AClass · 0.70

Tested by

no test coverage detected