Unexpected upcasting of complex64 to complex128
Closed this issue · 1 comments
mutricyl commented
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)
github-actions commented
Message to comment on stale issues. If none provided, will not mark issues stale