From 72af24df557802015820714aaa3d105d53216431 Mon Sep 17 00:00:00 2001 From: Navpreet Singh Date: Fri, 18 Nov 2022 02:57:11 -0500 Subject: BUG: Histogramdd breaks on big arrays in Windows (#22561) * BUG: Histogramdd breaks on big arrays in Windows Resolved the issue with line change from int to np.intp in numpy/numpy/lib/histograms.py * BUG: Histogramdd breaks on big arrays in Windows Resolved the issue with line change from int to np.intp in numpy/numpy/lib/histograms.py * Removed the binary files * Update test_histograms.py * Update test_histograms.py * Update test_histograms.py --- numpy/lib/tests/test_histograms.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'numpy/lib/tests') diff --git a/numpy/lib/tests/test_histograms.py b/numpy/lib/tests/test_histograms.py index 87643169b..87e6e1d41 100644 --- a/numpy/lib/tests/test_histograms.py +++ b/numpy/lib/tests/test_histograms.py @@ -6,6 +6,7 @@ from numpy.testing import ( assert_array_almost_equal, assert_raises, assert_allclose, assert_array_max_ulp, assert_raises_regex, suppress_warnings, ) +from numpy.testing._private.utils import requires_memory import pytest @@ -397,6 +398,16 @@ class TestHistogram: edges = histogram_bin_edges(arr, bins='auto', range=(0, 1)) assert_array_equal(edges, e) + @requires_memory(free_bytes=1e10) + @pytest.mark.slow + def test_big_arrays(self): + sample = np.zeros([100000000, 3]) + xbins = 400 + ybins = 400 + zbins = np.arange(16000) + hist = np.histogramdd(sample=sample, bins=(xbins, ybins, zbins)) + assert_equal(type(hist), type((1, 2))) + class TestHistogramOptimBinNums: """ -- cgit v1.2.1