Skip to content

Commit

Permalink
Fix bug in ticket numpy#592 for non-array sequence bin arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Jan 22, 2008
1 parent d1c740c commit c1efbb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions numpy/lib/function_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def histogram(a, bins=10, range=None, normed=False):
mx += 0.5
bins = linspace(mn, mx, bins, endpoint=False)
else:
bins = asarray(bins)
if(any(bins[1:]-bins[:-1] < 0)):
raise AttributeError, 'bins must increase monotonically.'

Expand Down

0 comments on commit c1efbb1

Please sign in to comment.