Back to Numerical Arrays (NumPy)
np.testing.assert_
Assert a condition is true.
Syntax
np.testing.assert_(val, msg?)
Description
Assert a condition is true. Unlike the built-in assert, this works in optimized mode and provides a consistent interface.
Parameters
| Name | Description |
|---|---|
| val | - Value to test for truthiness |
| msg(optional) | - Message to display on failure |
Returns
void