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

improve warnings for Series.{real,imag} #27651

Merged
merged 3 commits into from
Jul 30, 2019

Conversation

h-vetinari
Copy link
Contributor

@gfyoung gfyoung added Error Reporting Incorrect or improved errors from pandas Series Series data structure labels Jul 30, 2019
pandas/core/series.py Outdated Show resolved Hide resolved
"`real` has be deprecated and will be removed in a future version",
"`real` has be deprecated and will be removed in a future "
"version. To eliminate this warning for a Series `ser`, use "
"`np.real(ser.to_array())` or `ser.to_array().real`.",
Copy link
Member

Choose a reason for hiding this comment

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

Should the to_array be a to_numpy ?

@@ -955,7 +955,9 @@ def real(self):
.. deprecated:: 0.25.0
"""
warnings.warn(
"`real` has be deprecated and will be removed in a future version",
"`real` has be deprecated and will be removed in a future "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"`real` has be deprecated and will be removed in a future "
"`real` is deprecated and will be removed in a future "

fixing an existing typo at once

@@ -973,7 +975,9 @@ def imag(self):
.. deprecated:: 0.25.0
"""
warnings.warn(
"`imag` has be deprecated and will be removed in a future version",
"`imag` has be deprecated and will be removed in a future "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"`imag` has be deprecated and will be removed in a future "
"`imag` is deprecated and will be removed in a future "

@jorisvandenbossche jorisvandenbossche added this to the 0.25.1 milestone Jul 30, 2019
@jorisvandenbossche jorisvandenbossche merged commit 143bc34 into pandas-dev:master Jul 30, 2019
@lumberbot-app
Copy link

lumberbot-app bot commented Jul 30, 2019

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout 0.25.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 143bc34aa8f068b18e7137df7ca91b9929cc1389
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #27651: improve warnings for Series.{real,imag}'
  1. Push to a named branch :
git push YOURFORK 0.25.x:auto-backport-of-pr-27651-on-0.25.x
  1. Create a PR against branch 0.25.x, I would have named this PR:

"Backport PR #27651 on branch 0.25.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Series Series data structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impossible to use any variant of ".real/.imag" without warning
4 participants