Luke Zoltan Kelley
2015-11-03 14:40:31 UTC
np.histogram(np.arange(10), range=(0.0, np.inf))
(array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),array([ nan, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf]))
np.histogram(np.arange(10), range=(0.0, np.nan))
(array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),array([ nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]))
Clearly the behavior is undefined for those arguments, but perhaps there should be an assertion that the given range must be finite? Happy to make a PR for this.
Luke