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

Method __array__

numpy/core/tests/test_indexing.py:422–423  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

420 class ArrayLike:
421 # Simple array, should behave like the array
422 def __array__(self):
423 return np.array(0)
424
425 a = np.zeros(())
426 assert_(isinstance(a[()], np.float_))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected