MCPcopy Index your code
hub / github.com/numpy/numpy / test_none_wrap

Method test_none_wrap

numpy/_core/tests/test_umath.py:3410–3421  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3408 assert_raises(RuntimeError, ncu.frexp, 1, ok, bad)
3409
3410 def test_none_wrap(self):
3411 # Tests that issue #8507 is resolved. Previously, this would segfault
3412
3413 class A:
3414 def __array__(self, dtype=None, copy=None):
3415 return np.zeros(1)
3416
3417 def __array_wrap__(self, arr, context=None, return_scalar=False):
3418 return None
3419
3420 a = A()
3421 assert_equal(ncu.maximum(a, a), None)
3422
3423 def test_default_prepare(self):
3424

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
AClass · 0.70

Tested by

no test coverage detected