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

Method test_none_wrap

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

Source from the content-addressed store, hash-verified

3128 assert_raises(RuntimeError, ncu.frexp, 1, ok, bad)
3129
3130 def test_none_wrap(self):
3131 # Tests that issue #8507 is resolved. Previously, this would segfault
3132
3133 class A:
3134 def __array__(self):
3135 return np.zeros(1)
3136
3137 def __array_wrap__(self, arr, context=None):
3138 return None
3139
3140 a = A()
3141 assert_equal(ncu.maximum(a, a), None)
3142
3143 def test_default_prepare(self):
3144

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
AClass · 0.70

Tested by

no test coverage detected