-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: pd.api.extensions.take does not accept NumpyExtensionArray #59177
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
Comments
Thanks for the report! I'm surprised that On a separate matter, is there a specific reason you're using |
For the record this issue is linked to pint-pandas development and particularly hgrecco/pint-pandas#239. New version of
For example: >>> pd.array([1+1j,2,3]).dtype
NumpyEADtype('complex128') # NumpyExtensionArray
>>> pd.array([1,2,3]).dtype
Int64Dtype() # ExtensionArray There is no build in pandas |
If the check is disabled, the take operation appears to work without issue. Agreed this should work - PRs to fix are welcome. |
take |
* update algo.take to solve #59177 * forgot to update TestExtensionTake::test_take_coerces_list * fixing pandas/tests/dtypes/test_generic.py::TestABCClasses::test_abc_hierarchy * ABCExtensionArray set formatting --------- Co-authored-by: Laurent Mutricy <[email protected]>
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I'd expect NumpyExtensionArray to be considered an ExtensionArray, so compatable with pd.api.extensions.take.
Expected Behavior
return
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered: