Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch Pandas AssertionError on deprecated multidimensional indexing. Closes #18158 #18167

Merged
merged 3 commits into from
Aug 4, 2020
Merged

Conversation

l-johnston
Copy link
Contributor

PR Summary

Fixes #18158 due to pandas-dev/pandas#35527

@l-johnston l-johnston changed the title Catch Pandas AssertionError on deprecated multidimensional indexing #18158 Catch Pandas AssertionError on deprecated multidimensional indexing. Closes #18158 Aug 4, 2020
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.... I guess 😉.

@jklymak jklymak added this to the v3.3.1 milestone Aug 4, 2020
@jklymak jklymak added third-party integration Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labels Aug 4, 2020
@jklymak jklymak requested a review from tacaswell August 4, 2020 16:56
@l-johnston
Copy link
Contributor Author

It might be better to narrow the AssertionError catch to the Pandas warning using:

...
try:
    ndim = x[:, None].ndim
except AssertionError as exc:
    if len(w) > 0:
        return np.asanyarray(x)
    else:
        raise AssertionError(exc) from None
...

Do you prefer this approach?

@jklymak
Copy link
Member

jklymak commented Aug 4, 2020

I wasn't concerned about the approach, just that we have to do such a dance to get around it. If we are going to first-class pandas like this, we really need to test their RCs and vice-versa.

@tacaswell
Copy link
Member

Thanks @l-johnston ! I think (?) this is your first Matplotlib RP, 🎉 Hopefully we will hear from you again!

QuLogic added a commit that referenced this pull request Aug 5, 2020
…167-on-v3.3.x

Backport PR #18167 on branch v3.3.x (Catch Pandas AssertionError on deprecated multidimensional indexing. Closes #18158)
@l-johnston l-johnston deleted the issue_18158 branch August 5, 2020 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. third-party integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X-axis that is Pandas Series time zone aware timestamps raises AssertionError
3 participants