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

Method __array__

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

Source from the content-addressed store, hash-verified

6792 # See gh-14247, error checking was missing for failed dtype discovery
6793 class BadObject(object):
6794 def __array__(self):
6795 raise TypeError("just this tiny mint leaf")
6796
6797 with pytest.raises(TypeError):
6798 np.dot(BadObject(), BadObject())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected