module documentation

Undocumented

Function check_operations There are many dedicated paths in NumPy which cast and should check for floating point errors which occurred during those casts.
Function test_floatingpoint_errors_casting Undocumented
Function values_and_dtypes Generate value+dtype pairs that generate floating point errors during casts. The invalid casts to integers will generate "invalid" value warnings, the float casts all generate "overflow".
def check_operations(dtype, value): (source)

There are many dedicated paths in NumPy which cast and should check for floating point errors which occurred during those casts.

@pytest.mark.skipif(IS_WASM, reason='no wasm fp exception support')
@pytest.mark.parametrize(['value', 'dtype'], values_and_dtypes())
@pytest.mark.filterwarnings('ignore::numpy.ComplexWarning')
def test_floatingpoint_errors_casting(dtype, value): (source)

Undocumented

def values_and_dtypes(): (source)

Generate value+dtype pairs that generate floating point errors during casts. The invalid casts to integers will generate "invalid" value warnings, the float casts all generate "overflow".

(The Python int/float paths don't need to get tested in all the same situations, but it does not hurt.)