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: explicit 'import awkward' needed to write NumPy strings #1266

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

jpivarski
Copy link
Member

The lack of an import uproot was an oversight. Most string-writing uses Awkward Arrays directly, but it's possible to get arrays of strings directly from NumPy (dtype="U#"). Since our machinery requires contiguous, jagged string data, we must require the Awkward library to do the writing (which might still be a surprise to someone who tries this without installing Awkward), but at least now Uproot knows that it needs to import it.

@jpivarski jpivarski enabled auto-merge (squash) August 15, 2024 15:08
@jpivarski jpivarski merged commit aa8b94f into main Aug 15, 2024
24 checks passed
@jpivarski jpivarski deleted the jpivarski/write-NumPy-array-of-strings branch August 15, 2024 15:23
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.

Writing TTrees to a file from a numpy array containing strings
1 participant