diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-04-30 23:31:21 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-04-30 23:31:21 -0700 |
commit | 8ed017a30c8ec60f17538c585f87415a1ca989fc (patch) | |
tree | e2c6c40ce082101eb1423a3a0b0d0aa355cc7a58 /numpy/lib/histograms.py | |
parent | 4a5d02fe2879846404a2a3a5f347c4c4509ee6d9 (diff) | |
download | numpy-8ed017a30c8ec60f17538c585f87415a1ca989fc.tar.gz |
BUG: histogramdd fails on large integers
This is due to gh-11022.
Diffstat (limited to 'numpy/lib/histograms.py')
-rw-r--r-- | numpy/lib/histograms.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py index bd3c68306..2922b3a86 100644 --- a/numpy/lib/histograms.py +++ b/numpy/lib/histograms.py @@ -906,7 +906,8 @@ def histogramdd(sample, bins=10, range=None, normed=False, weights=None): # Compute the bin number each sample falls into. Ncount = tuple( - np.digitize(sample[:, i], edges[i]) + # avoid np.digitize to work around gh-11022 + np.searchsorted(edges[i], sample[:, i], side='right') for i in _range(D) ) |