From 4d03d7067a54f74635d1d3339974d34fd5cba245 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 1 Aug 2024 21:52:41 -0600 Subject: [PATCH] Stricter tolerance in property tests (#377) * Stricter tolerance in property tests now that https://github.com/ml31415/numpy-groupies/pull/90 was merged * skip float32 with cumsum --- tests/test_properties.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_properties.py b/tests/test_properties.py index 26150519..6fef85b3 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -111,9 +111,7 @@ def test_groupby_reduce(data, array, func: str) -> None: actual = actual.astype(cast_to) note(("expected: ", expected, "actual: ", actual)) - tolerance = ( - {"rtol": 1e-13, "atol": 1e-15} if "var" in func or "std" in func else {"atol": 1e-15} - ) + tolerance = {"atol": 1e-15} assert_equal(expected, actual, tolerance) @@ -131,7 +129,7 @@ def test_scans(data, array: dask.array.Array, func: str) -> None: # Too many float32 edge-cases! if "cum" in func and array.dtype.kind == "f" and array.dtype.itemsize == 4: - array = array.astype(np.float64) + assume(False) numpy_array = array.compute() assume((np.abs(numpy_array) < 2**53).all())