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

Method __bool__

numpy/core/tests/test_numeric.py:1523–1524  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1521
1522 class BoolErrors:
1523 def __bool__(self):
1524 raise ValueError("Not allowed")
1525
1526 assert_raises(ValueError, np.nonzero, np.array([BoolErrors()]))
1527

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected