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

Method __array__

numpy/core/tests/test_scalarmath.py:707–708  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

705 def __init__(self, arr):
706 self.arr = arr
707 def __array__(self):
708 return self.arr
709
710 # Test for simple ArrayLike above and memoryviews (original report)
711 for arr_like in (ArrayLike(np.ones(3)), memoryview(np.ones(3))):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected