-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Closed
Copy link
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.
Milestone
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Problem description
The current implementation of ExtensionArray.equals expects that the implementation of ExtensionArray.all always returns a numpy scalar, see
pandas/pandas/core/arrays/base.py
Line 741 in 942beba
| return (equal_values | equal_na).all().item() |
numpy as the backing memory store, I don't it is reasonable to stick to NumPy scalars here.
Instead, the method should unpack numpy scalars if necessary but passthrough otherwise.
Context: This appeared while running the unit tests with fletcher and pandas' master.
Metadata
Metadata
Assignees
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.