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

Method __array__

numpy/core/tests/test_multiarray.py:9682–9683  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9680def test_comparisons_forwards_error(op):
9681 class NotArray:
9682 def __array__(self):
9683 raise TypeError("run you fools")
9684
9685 with pytest.raises(TypeError, match="run you fools"):
9686 op(np.arange(2), NotArray())

Callers 3

test___array__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected