Skip to content

Commit 19d3127

Browse files
Handle complex128 EA in _ensure_data
The _duplicate functions expect complex128 data in ndarrays, not EAs. Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
1 parent f1139f5 commit 19d3127

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/algorithms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ def _ensure_data(values: ArrayLike) -> np.ndarray:
167167
return np.asarray(values)
168168

169169
elif is_complex_dtype(values.dtype):
170+
if values.dtype.itemsize == 16:
171+
# We have support for complex128
172+
return np.asarray(values)
170173
return cast(np.ndarray, values)
171174

172175
# datetimelike

0 commit comments

Comments
 (0)