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

Method __int__

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

Source from the content-addressed store, hash-verified

1247
1248 class ThrowingInteger(np.ndarray):
1249 def __int__(self):
1250 raise TypeError
1251
1252 throwing_int = np.array(1).view(ThrowingInteger)
1253 assert_raises(TypeError, random.hypergeometric, throwing_int, 1, 1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected