diff options
author | David Huard <david.huard@gmail.com> | 2011-07-20 14:36:35 -0400 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-07-24 18:46:50 +0200 |
commit | 1b62bdfb04e56f75fc61dbbd1f2600a72951b19d (patch) | |
tree | b4666b9807cc29ccfe97178ba36c2f6ca04663ce /numpy/lib/function_base.py | |
parent | e2af7b755746a7269df247418ee383f1eb39c0bc (diff) | |
download | numpy-1b62bdfb04e56f75fc61dbbd1f2600a72951b19d.tar.gz |
BUG: fixed histogramdd bug with empty inputs. Closes #1899.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index d20304a1b..8a0c0b37d 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -335,11 +335,11 @@ def histogramdd(sample, bins=10, range=None, normed=False, weights=None): Found bin edge of size <= 0. Did you specify `bins` with non-monotonic sequence?""") + nbin = asarray(nbin) + # Handle empty input. if N == 0: - return np.zeros(D), edges - - nbin = asarray(nbin) + return np.zeros(nbin-2), edges # Compute the bin number each sample falls into. Ncount = {} |