FIX: allow nan values in data for plt.hist#11267
Conversation
|
See #9706 for a longer discussion of this. However, it looks like it is still an open issue. |
|
Thanks for the reference, thats for sure a more thorough solution. But maybe its worth nevertheless to apply the patch here as long you don't decide about the other one, because plt.hist can already handle nans in a histogram, the only thing failing is the determination of range, i.e. |
timhoffm
left a comment
There was a problem hiding this comment.
Approving as a bug fix for more consistency. If plt.hist works with nans and an explicit range, it should also work without a range.
Not saying anything about how missing data should be treated more generally, but since #9706 doesn't appear to advance, this solution is good enough for the moment.
|
Thanks, it looks like CircleCI failed due to some unrelated hiccup on their side Do you just ignore that? Or can you trigger that manually again? |
|
I think the circle-ci was just down... Since this has no documentation issues, we can ignore that test... |
PR Summary
This change is a little older, but somehow made it never into a PR. Simple patch to allow plt.hist to determine the range even if there are nan's in the the data, e.g.
plt.hist([1,2,3,np.nan]). CurrentlyValueError: max must be larger than min in range parameter.is raised.PR Checklist