Skip to content

update algo.take to solve #59177 #59181

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

Merged
merged 4 commits into from
Jul 6, 2024

Conversation

mutricyl
Copy link
Contributor

@mutricyl mutricyl commented Jul 4, 2024

@mutricyl
Copy link
Contributor Author

mutricyl commented Jul 4, 2024

need to work on

FAILED pandas/tests/dtypes/test_generic.py::TestABCClasses::test_abc_hierarchy[ABCNumpyExtensionArray-inst6-ABCExtensionArray-subs2]

@mutricyl
Copy link
Contributor Author

mutricyl commented Jul 5, 2024

There are a few others if isinstance(xxx, (ABCIndex, ABCSeries, ExtensionArray)) like tests in pandas code (algorithms.py, common.py, categorial.py, blocks.py) and I wonder if I should find them all and append ABCNumpyExtensionArray ?

@@ -139,7 +139,13 @@ def _subclasscheck(cls, inst) -> bool:
"ABCExtensionArray",
"_typ",
# Note: IntervalArray and SparseArray are included bc they have _typ="extension"
{"extension", "categorical", "periodarray", "datetimearray", "timedeltaarray"},
{
"extension",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I correct in seeing that just for formatting here changed? i.e. There is no new elements added to this set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short story

Indeed the set content have not changed.

long story

I first tried to resolve the issue adding one element to the set which induces black to change formatting. I realized afterwards that ABCNumpyExtensionArray already existed so I finaly used it. I forgot at the end to revert the formating change for ABCExtensionArray

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, could you undo the formatting here?

@mroeschke mroeschke added the Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff label Jul 5, 2024
@mroeschke mroeschke added this to the 3.0 milestone Jul 6, 2024
@mroeschke mroeschke merged commit 236d89b into pandas-dev:main Jul 6, 2024
45 checks passed
@mroeschke
Copy link
Member

Thanks @mutricyl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pd.api.extensions.take does not accept NumpyExtensionArray
2 participants