summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2009-04-10 01:58:27 +0000
committerCharles Harris <charlesr.harris@gmail.com>2009-04-10 01:58:27 +0000
commite02bf24487e84fb7bbb6bb2ffc25d5833f5ae30d (patch)
tree72e3d3283c7473815b08fee55b62f6845f52f3fc /numpy/lib/function_base.py
parent85eb59a8b2625296310bb8628177792cc506a509 (diff)
downloadnumpy-e02bf24487e84fb7bbb6bb2ffc25d5833f5ae30d.tar.gz
Fix ticket #928
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 3d7428e69..d37dd0feb 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -505,7 +505,9 @@ def histogramdd(sample, bins=10, range=None, normed=False, weights=None):
Ncount[i][on_edge] -= 1
# Flattened histogram matrix (1D)
- hist = zeros(nbin.prod(), float)
+ # Reshape is used so that overlarge arrays
+ # will raise an error.
+ hist = zeros(nbin, float).reshape(-1)
# Compute the sample indices in the flattened histogram matrix.
ni = nbin.argsort()