Skip to content

Unexpected upcasting of complex64 to complex128 #492

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
mutricyl opened this issue Jun 28, 2024 · 1 comment
Closed

Unexpected upcasting of complex64 to complex128 #492

mutricyl opened this issue Jun 28, 2024 · 1 comment
Labels

Comments

@mutricyl
Copy link

Working on pandas-dev/pandas#21374 I am Coming across unexpected complex128 upcasting.

here is an example of numexpr upcasting complex64 to complex128 when python operation conserves the correct dtype.

>>> compl = 1 + 1j
>>> ne.evaluate('compl + 2').dtype
dtype('complex128')
>>> ne.evaluate('compl + compl').dtype
dtype('complex128')
>>> compl+compl
(2+2j)
>>> type(compl+compl)
<class 'complex'>
>>> type(compl+2)
<class 'complex'>

Originally posted by @mutricyl in #155 (comment)

Copy link

Message to comment on stale issues. If none provided, will not mark issues stale

@github-actions github-actions bot added the Stale label Aug 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant