Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
FIX: let pandas IndexInt64 work for boxplot#13398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3926,6 +3926,10 @@ def dopatch(xs, ys, **kwargs): | ||
| elif len(positions) != N: | ||
| raise ValueError(datashape_message.format("positions")) | ||
| positions = np.array(positions) | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This is a good fix for the case described in the ticket, but I think the code will continue raising obscure error when positions are not numbers. Can you add a check after this line about the dtype of the array being a number? Maybe something like: ifnotisinstance(positions.dtype,numbers.Number):raiseTypeError("positions should be a iterable of dtype number, but found dtype %s"%blahblahblah.) When we end up supporting something else than numbers, this can be updated. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I couldn't quite get that check to work; I had to check the first element. But if there is a better way, let me know. | ||
| if len(positions) > 0 and not isinstance(positions[0], Number): | ||
| raise TypeError("positions should be an iterable of numbers") | ||
| # width | ||
| if widths is None: | ||
| widths = [np.clip(0.15 * np.ptp(positions), 0.15, 0.5)] * N | ||