From ea7fac99e65037699eefe97b714808f7c73bf147 Mon Sep 17 00:00:00 2001 From: Brandon Carter Date: Sat, 24 Jun 2017 23:13:38 -0400 Subject: BUG: fixes unsigned bins monotonicity check, see #9222 --- numpy/lib/function_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/function_base.py') 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.') -- cgit v1.2.1