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

Method __float__

numpy/random/tests/test_randomstate.py:1241–1242  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1239
1240 class ThrowingFloat(np.ndarray):
1241 def __float__(self):
1242 raise TypeError
1243
1244 throwing_float = np.array(1.0).view(ThrowingFloat)
1245 assert_raises(TypeError, random.uniform, throwing_float,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected