diff options
author | dhuard <dhuard@localhost> | 2009-08-12 14:12:21 +0000 |
---|---|---|
committer | dhuard <dhuard@localhost> | 2009-08-12 14:12:21 +0000 |
commit | da19f3edc5c8995afc821ddc949b386e781e0b6a (patch) | |
tree | c930365788daa9185583862f49b12b49b993c894 /numpy/lib/function_base.py | |
parent | f97cb4cd9d14c538dbb581426aa30d9dd96b1d06 (diff) | |
download | numpy-da19f3edc5c8995afc821ddc949b386e781e0b6a.tar.gz |
Fixed compatibility issue of histogram with matplotlib 0.91.2
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 d56e69611..663c3d2ef 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -378,11 +378,11 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None): n = np.diff(n) - if normed is False: - return n, bins - elif normed is True: + if normed: db = array(np.diff(bins), float) return n/(n*db).sum(), bins + else: + return n, bins def histogramdd(sample, bins=10, range=None, normed=False, weights=None): |