This came up in [a matplotlib
issue](https://github.com/matplotlib/matplotlib/issues/5221):
>>> 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
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion