summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-04-30 23:31:21 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-04-30 23:31:21 -0700
commit8ed017a30c8ec60f17538c585f87415a1ca989fc (patch)
treee2c6c40ce082101eb1423a3a0b0d0aa355cc7a58 /numpy/lib/histograms.py
parent4a5d02fe2879846404a2a3a5f347c4c4509ee6d9 (diff)
downloadnumpy-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.py3
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)
)