Back to Numerical Arrays (NumPy)
np.testing.assert_warns
Assert that a function emits a warning.
Syntax
np.testing.assert_warns(warning_class, callable, args)
Description
Assert that a function emits a warning. Note: JavaScript doesn't have built-in warnings. This integrates with a custom warning system if available.
Parameters
| Name | Description |
|---|---|
| warning_class | - Expected warning type |
| callable | - Function to call |
| args | - Arguments to pass to callable |
Returns
unknown