1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Ole Streicher <olebole@debian.org>
Date: Fri, 31 Jan 2025 08:38:37 +0100
Subject: Skip test_1d_compare_with_numpy tests that fail with numpy
initialization
Closes: #1094732
---
fast_histogram/tests/test_histogram.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fast_histogram/tests/test_histogram.py b/fast_histogram/tests/test_histogram.py
index 020b5e0..630397d 100644
--- a/fast_histogram/tests/test_histogram.py
+++ b/fast_histogram/tests/test_histogram.py
@@ -44,7 +44,10 @@ def test_1d_compare_with_numpy(size, nx, xmin, xmax, weights, dtype):
x = values[size:]
- reference = np.histogram(x, bins=nx, weights=w, range=(xmin, xmax))[0]
+ try:
+ reference = np.histogram(x, bins=nx, weights=w, range=(xmin, xmax))[0]
+ except ValueError as e:
+ pytest.skip(e.args[0])
# First, check the Numpy result because it sometimes doesn't make sense. See
# bug report https://github.com/numpy/numpy/issues/9435
|