diff options
| author | Brandon Carter <bcarter@mit.edu> | 2017-06-24 23:13:38 -0400 |
|---|---|---|
| committer | Brandon Carter <bcarter@mit.edu> | 2017-06-24 23:13:38 -0400 |
| commit | ea7fac99e65037699eefe97b714808f7c73bf147 (patch) | |
| tree | 7ff4013aca1db00bb1ec6889ad67643753d25232 /numpy/lib | |
| parent | 23c1db87a939dc2f19cfa3744389e3be667215ba (diff) | |
| download | numpy-ea7fac99e65037699eefe97b714808f7c73bf147.tar.gz | |
BUG: fixes unsigned bins monotonicity check, see #9222
Diffstat (limited to 'numpy/lib')
| -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 a3db3494c..8bde521bf 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -782,7 +782,7 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, bins = bin_edges else: bins = asarray(bins) - if (np.diff(bins) < 0).any(): + if not np.all(bins[1:] > bins[:-1]): raise ValueError( 'bins must increase monotonically.') |
