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

Method __float__

numpy/core/tests/test_array_coercion.py:667–668  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

665 def test_0d_generic_special_case(self):
666 class ArraySubclass(np.ndarray):
667 def __float__(self):
668 raise TypeError("e.g. quantities raise on this")
669
670 arr = np.array(0.)
671 obj = arr.view(ArraySubclass)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected