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

Remove deprecated usage of Series.nonzero() #1331

Closed
wants to merge 1 commit into from

Conversation

charignon
Copy link

Summary

Series.nonzero() was deprecated in pandas-dev/pandas#24048.
Using the latest pandas breaks fbprophet.
We can replace .nonzero() use with .to_numpy().nonzero().

Test Plan

  • CI

Series.nonzero() was deprecated in pandas-dev/pandas#24048.

Using the latest pandas breaks fbprophet.

We can replace .nonzero() use with .to_numpy().nonzero().
@bletham
Copy link
Contributor

bletham commented Feb 17, 2020

Thanks for the PR!
The latest pandas does break fbprophet (to be fixed real soon), but I don't think this is an issue. dt.values is a numpy array, and so shouldn't be affected by the deprecation of nonzero() in pandas. Is there an error you're seeing related to this or another reason this is needed?

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.values.html

@charignon
Copy link
Author

You are right, I tested on an older version and this is no longer relevant after your last commit touching this code, closing.

@charignon charignon closed this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants