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

Class A

numpy/_core/tests/test_umath.py:3325–3329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3323 # test fix for bug #826:
3324
3325 class A(np.ndarray):
3326 __array_priority__ = 10
3327
3328 def __new__(cls):
3329 return np.asarray(1.0, 'float64').view(cls).copy()
3330
3331 a = A()
3332 x = np.float64(1) * a

Calls

no outgoing calls

Tested by 12

test_priorityMethod · 0.56
test_failing_wrapMethod · 0.56
test_none_wrapMethod · 0.56
test_ufunc_overrideMethod · 0.56
test_gufunc_overrideMethod · 0.56