8000 BUG/DOC/MAINT: Tidy up histogramdd by eric-wieser · Pull Request #10802 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG/DOC/MAINT: Tidy up histogramdd #10802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 7, 2018
Prev Previous commit
BUG: Use intp for indices
Fixes gh-8531
  • Loading branch information
eric-wieser committed Apr 6, 2018
commit c8a5f560f1eedd510ca5656b06dd1ca2ba9322bd
2 changes: 1 addition & 1 deletion numpy/lib/histograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
0