Assert functions
The NumPy testing package has a number of utility functions that test whether a precondition is true or not. The following table lists the NumPy assert functions:
Function |
Description |
---|---|
|
This raises an exception if two numbers are not equal up to a specified precision |
|
This raises an exception if two numbers are not equal up to a certain significance |
|
This raises an exception if two arrays are not equal up to a specified precision |
|
This raises an exception if two arrays are not equal |
|
This raises an exception if two arrays do not have the same shape, and the elements of the first array are strictly less than the elements of the second array |
|
This raises an exception if two objects are not equal |
|
This fails if a specified exception is not raised by a callable function invoked with defined arguments |
|
This fails... |