BUG: nanops._maybe_null_out doesn't work with complex numbers #7353
Labels
Bug
Internals
Related to non-user accessible pandas implementation
Numeric Operations
Arithmetic, Comparison, and Logical operations
Testing
pandas testing functions or related to the test suite
Milestone
A number of nanops functions rely on the private internal function
nanops._maybe_null_out
. These includenansum
,nanmin
,nanmax
, andnanprod
. All of these, in principle, should work with arrays with a complex dtype. However, due to a bug in_maybe_null_out
, they convert the array to a float under certain situations, resulting in erroneous results. The easiest way to trigger this is to have a complex array where all the imaginary values are nan, and makeaxis
argument something other thanNone
.The text was updated successfully, but these errors were encountered: