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

Method __float__

numpy/random/tests/test_random.py:993–994  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

991
992 class ThrowingFloat(np.ndarray):
993 def __float__(self):
994 raise TypeError
995
996 throwing_float = np.array(1.0).view(ThrowingFloat)
997 assert_raises(TypeError, np.random.uniform, throwing_float,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected