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

Method test_array_too_many_args

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

Source from the content-addressed store, hash-verified

3208 assert_raises(RuntimeError, ncu.maximum, a, a, where=False)
3209
3210 def test_array_too_many_args(self):
3211
3212 class A:
3213 def __array__(self, dtype, context):
3214 return np.zeros(1)
3215
3216 a = A()
3217 assert_raises_regex(TypeError, '2 required positional', np.sum, a)
3218
3219 def test_ufunc_override(self):
3220 # check override works even with instance with high priority.

Callers

nothing calls this directly

Calls 2

assert_raises_regexFunction · 0.90
AClass · 0.70

Tested by

no test coverage detected