Skip to content

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

Merged
charris merged 1 commit intonumpy:maintenance/1.21.xfrom
BvB93:real_imag
Jun 24, 2021
Merged

MAINT: Fixed the return-dtype of ndarray.real and imag#19324
charris merged 1 commit intonumpy:maintenance/1.21.xfrom
BvB93:real_imag

Conversation

@BvB93
Copy link
Copy Markdown
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
Copy Markdown
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