diff options
author | dhuard <dhuard@localhost> | 2010-08-27 20:21:22 +0000 |
---|---|---|
committer | dhuard <dhuard@localhost> | 2010-08-27 20:21:22 +0000 |
commit | 3743430ec92b16aadb7d0cac4515db07a15ac635 (patch) | |
tree | 0a5afd4259949f2d550946b562276ece4fcd8e1f /numpy/lib/function_base.py | |
parent | 71dfaec057fb543a42a9ad10f187b128e274169a (diff) | |
download | numpy-3743430ec92b16aadb7d0cac4515db07a15ac635.tar.gz |
Fixed bug in histogram for non-uniform bin widths and normed=True.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index a1c4cae4b..0ef75b02a 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -191,7 +191,7 @@ def histogram(a, bins=10, range=None, normed=False, weights=None): if normed: db = array(np.diff(bins), float) - return n/(n*db).sum(), bins + return n/db/n.sum(), bins else: return n, bins |