Skip to content

BUG: pd.Series([complex('nan')]) raises #53627

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

Closed
jbrockmendel opened this issue Jun 12, 2023 · 3 comments · Fixed by #53682
Closed

BUG: pd.Series([complex('nan')]) raises #53627

jbrockmendel opened this issue Jun 12, 2023 · 3 comments · Fixed by #53682
Assignees
Labels
Bug Complex Complex Numbers Constructors Series/DataFrame/Index/pd.array Constructors

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Jun 12, 2023

>>> pd.Series([complex('nan')])
[...]
  File "lib.pyx", line 2488, in pandas._libs.lib.maybe_convert_objects
TypeError: must be real number, not complex
@jbrockmendel jbrockmendel added Bug Complex Complex Numbers Constructors Series/DataFrame/Index/pd.array Constructors Needs Triage Issue that has not been reviewed by a pandas team member and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 12, 2023
@Charlie-XIAO
Copy link
Contributor

take

@Charlie-XIAO
Copy link
Contributor

Charlie-XIAO commented Jun 15, 2023

Is the Series expected to have dtype float64 or complex128 @jbrockmendel?

Edit: nvm I suppose it should be complex128.

@jbrockmendel
Copy link
Member Author

jbrockmendel commented Jun 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Complex Complex Numbers Constructors Series/DataFrame/Index/pd.array Constructors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants