-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Impossible to use any variant of ".real/.imag" without warning #27610
Comments
What can pandas do to avoid the warning from I'd recommend |
The warning comes from pandas, not numpy: Line 954 in d1accd0
Is there a way to distinguish a call
That recommendation could be part of the warning? |
Right. What I meant was |
Thanks for the explanation. In this case, I agree that it's hard to actually do something. I'm kind of wondering why this deprecation was necessary at all, but I guess amending the warning to inform the user of |
A PR updating the error message would be welcome. Are you interested in
working on it?
…On Mon, Jul 29, 2019 at 5:37 PM h-vetinari ***@***.***> wrote:
Thanks for the explanation. In this case, I agree that it's hard to
actually do something.
I'm kind of wondering why this deprecation was necessary at all, but I
guess amending the warning to inform the user of
np.real(Series.to_array()) of Series.to_array().real would be useful?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#27610?email_source=notifications&email_token=AAKAOITLHO3XIBO35X4BJ5DQB5WKVA5CNFSM4IHD6QEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3CGSWQ#issuecomment-516188506>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIVRN54N3DF52XQCIC3QB5WKVANCNFSM4IHD6QEA>
.
|
That's trivial. Will try to do so later. |
I think the only way to resolve |
@jorisvandenbossche
Once upon a time, the plan was to have no deprecations in 0.25 - I think it might be a bit short to remove the deprecations of 0.25 in 1.0...? |
This needs the
Ah, I assumed those deprecations were done earlier together with #20419 But yes, that is something we need to discuss. I think currently the implicit idea was to actually remove them, and basically say: "first upgrade to 0.25.0 to see all deprecation warnings and then upgrade to 1.0" (although, who would read such a recommendation ..). But I don't think we have this explicitly discussed somewhere. |
After #27106,
Series.{real,imag}
raise a deprecation warning, which I guess is fair enough from the POV of getting rid of things that came originally from subclassing ndarray.However, due to the way numpy and pandas still interact (with a lot of the
__array__
stuff behind the scenes), it is now also impossible to usenp.{real,imag}
without warning:I'm fine with whichever way is recommended, but there should be at least one way that does not raise warnings...?
@mroeschke @jreback
PS. One might also use this chance to fix a typo: "[...] has been deprecated [...]"
The text was updated successfully, but these errors were encountered: