From c8a5f560f1eedd510ca5656b06dd1ca2ba9322bd Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Mon, 26 Mar 2018 00:40:53 -0700 Subject: BUG: Use intp for indices Fixes gh-8531 --- numpy/lib/histograms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/histograms.py') diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py index bd2f80186..66e2ccda1 100644 --- a/numpy/lib/histograms.py +++ b/numpy/lib/histograms.py @@ -927,7 +927,7 @@ def histogramdd(sample, bins=10, range=None, normed=False, weights=None): # Compute the sample indices in the flattened histogram matrix. ni = nbin.argsort() - xy = np.zeros(N, int) + xy = np.zeros(N, np.intp) for i in np.arange(0, D-1): xy += Ncount[ni[i]] * nbin[ni[i+1:]].prod() xy += Ncount[ni[-1]] -- cgit v1.2.1