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

Method __array__

numpy/typing/tests/data/pass/arithmetic.py:29–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27
28class Object:
29 def __array__(self) -> np.ndarray[Any, np.dtype[np.object_]]:
30 ret = np.empty((), dtype=object)
31 ret[()] = self
32 return ret
33
34 def __sub__(self, value: Any) -> Object:
35 return self

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected