Skip to content
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

fix: adjust for Pandas changing its API again #1322

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

jpivarski
Copy link
Member

Before Uproot 5, we had

if hasattr(arrays.index, "arrays"):
index = arrays.index.arrays # pandas>=0.24.0
else:
index = arrays.index.values # pandas<0.24.0

to allow for different Pandas APIs before and after Pandas 0.24. But Pandas 0.24 is ancient, and I decided that we don't need to handle that anymore in #734 (which made a lot of changes, removing the explode-to-Pandas behavior).

But at some point in recent history, the attribute switched from Index.arrays back to Index.values. There's an Index.array, but it's a NumpyExtension, rather than a plain NumPy array, and np.add might prefer the real NumPy array.

@jpivarski jpivarski linked an issue Oct 29, 2024 that may be closed by this pull request
@jpivarski jpivarski merged commit 8ca7f15 into main Nov 7, 2024
26 checks passed
@jpivarski jpivarski deleted the jpivarski/pandas-changed-API-again branch November 7, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uproot.concatenate craches with 'cut' and 'library="pd"'
1 participant