Skip to content

Fixes for complex numbers #554

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

Merged
merged 3 commits into from
Sep 1, 2015
Merged

Fixes for complex numbers #554

merged 3 commits into from
Sep 1, 2015

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Aug 31, 2015

Fixes #553

Also ensures we skip NaN when aggregating with complex dtypes.

Still needs release notes.

These properties are useful for working with complex numbers.
shoyer added a commit that referenced this pull request Sep 1, 2015
@shoyer shoyer merged commit 663ade6 into pydata:master Sep 1, 2015
@shoyer shoyer deleted the real-and-imag branch September 1, 2015 20:28
@davidtrem
Copy link
Contributor

This is great ! Thanks!
One question still: what is the point of applying .real or .imag to dataset ?
As far as I understand xray.Dataset might be inhomogeneous (a mix of non homogeneous datatypes).
It doe make sense for xray.Dataarray though.
Maybe I was misleading by reporting incorrectly a pandas dataframe bug pandas-dev/pandas#10921 (comment) ?

@shoyer
Copy link
Member Author

shoyer commented Sep 2, 2015

One question still: what is the point of applying .real or .imag to dataset ? As far as I understand xray.Dataset might be inhomogeneous (a mix of non homogeneous datatypes).
It doe make sense for xray.Dataarray though.

If every data variable in your Dataset has numeric values, .real and .imag are perfectly well defined. If not, you'll get an error message when you try to use them. This is similar to the case for other operations that only work on numbers (e.g., binary arithmetic).

My two cents is that .real and .imag would also be appropriate for pandas.DataFrame, even though they only make sense for certain dtypes.

@davidtrem
Copy link
Contributor

OK. Thanks for clarifying 👍

@shoyer shoyer modified the milestone: 0.6.1 Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants