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

MAINT: Fixed the return-dtype of ndarray.real and imag #19324

Merged
merged 1 commit into from Jun 24, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jun 24, 2021

Backport of c66ffd9.
closes #19318.

Both properties were previously annotated is if the dtype of the parent- and to-be-returned-array were always the same,
an assumption that does not hold true for complex arrays.

The latter two would previously return complex arrays if the initial array was also complex
@BvB93 BvB93 added this to the 1.21.1 release milestone Jun 24, 2021
@BvB93 BvB93 linked an issue Jun 24, 2021 that may be closed by this pull request
@BvB93 BvB93 changed the title MAINT: Fixed an issue with the return-dtype of ndarray.real and imag MAINT: Fixed the return-dtype of ndarray.real and imag Jun 24, 2021
@charris charris merged commit c532dcd into numpy:maintenance/1.21.x Jun 24, 2021
@charris
Copy link
Member

charris commented Jun 24, 2021

Thanks Bas.

@BvB93 BvB93 deleted the real_imag branch June 24, 2021 13:29
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.

Incorrect type annotation for ndarray.real
2 participants