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

Class A

numpy/core/tests/test_umath.py:3030–3034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3028 # test fix for bug #826:
3029
3030 class A(np.ndarray):
3031 __array_priority__ = 10
3032
3033 def __new__(cls):
3034 return np.asarray(1.0, 'float64').view(cls).copy()
3035
3036 a = A()
3037 x = np.float64(1)*a

Calls

no outgoing calls

Tested by 13

test_priorityMethod · 0.56
test_failing_wrapMethod · 0.56
test_none_wrapMethod · 0.56
test_failing_prepareMethod · 0.56
test_ufunc_overrideMethod · 0.56