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

Method test_old_wrap

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

Source from the content-addressed store, hash-verified

3039 assert_array_equal(x, np.array(1))
3040
3041 def test_old_wrap(self):
3042
3043 class with_wrap:
3044 def __array__(self):
3045 return np.zeros(1)
3046
3047 def __array_wrap__(self, arr):
3048 r = with_wrap()
3049 r.arr = arr
3050 return r
3051
3052 a = with_wrap()
3053 x = ncu.minimum(a, a)
3054 assert_equal(x.arr, np.zeros(1))
3055
3056 def test_priority(self):
3057

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
with_wrapClass · 0.85

Tested by

no test coverage detected