Test support (cupy.testing
)#
Asserts#
Hint
These APIs can accept both numpy.ndarray
and cupy.ndarray
.
|
Raises an AssertionError if objects are not equal up to desired precision. |
|
Raises an AssertionError if objects are not equal up to desired tolerance. |
|
Compare two arrays relatively to their spacing. |
|
Check that all items of arrays differ in at most N Units in the Last Place. |
|
Raises an AssertionError if two array_like objects are not equal. |
|
Raises an AssertionError if array_like objects are not ordered by less than. |
CuPy-specific APIs#
Asserts#
|
Compares lists of arrays pairwise with |
NumPy-CuPy Consistency Check#
The following decorators are for testing consistency between CuPy’s functions and corresponding NumPy’s ones.
|
Decorator that checks NumPy results and CuPy ones are close. |
|
Decorator that checks NumPy results and CuPy ones are almost equal. |
|
Decorator that checks results of NumPy and CuPy are equal w.r.t. |
|
Decorator that checks results of NumPy and CuPy ones are equal w.r.t. |
|
Decorator that checks NumPy results and CuPy ones are equal. |
|
Decorator that checks the resulting lists of NumPy and CuPy's one are equal. |
|
Decorator that checks the CuPy result is less than NumPy result. |
Parameterized dtype Test#
The following decorators offer the standard way for parameterized test with respect to single or the combination of dtype(s).
|
Decorator for parameterized dtype test. |
|
Decorator that checks the fixture with all dtypes. |
|
Decorator that checks the fixture with float dtypes. |
|
Decorator that checks the fixture with signed dtypes. |
|
Decorator that checks the fixture with unsinged dtypes. |
|
Decorator that checks the fixture with integer and optionally bool dtypes. |
|
Decorator that checks the fixture with complex dtypes. |
|
Decorator that checks the fixture with a product set of dtypes. |
|
Decorator that checks the fixture with a product set of all dtypes. |
|
Decorator for parameterized test w.r.t. |
|
Decorator for parameterized test w.r.t. |
|
Decorator for parameterized test w.r.t. |
Parameterized order Test#
The following decorators offer the standard way to parameterize tests with orders.
|
Decorator to parameterize tests with order. |
|
Decorator that checks the fixture with orders 'C' and 'F'. |