Skip to content

Instantly share code, notes, and snippets.

@jpivarski
Created December 10, 2022 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpivarski/3a96997620954bd255e1e19ed69386fd to your computer and use it in GitHub Desktop.
Save jpivarski/3a96997620954bd255e1e19ed69386fd to your computer and use it in GitHub Desktop.

Uproot version 5.0.0

Uproot version 5 has a few major new features, one removal (uproot.lazy), and is based on Awkward Array version 2 instead of version 1.

uproot.lazy → uproot.dask

@kkothari2001 upgraded Uproot from Awkward version 1 to version 2, the major part of which was replacing uproot.lazy, which is based on Awkward 1's virtual and partitioned lazy arrays, with the new Dask collection, dask-awkward. The entry point for this function is uproot.dask.

@kkothari2001 also simplified Uproot's Pandas backend, which used to "explode" ragged arrays from ROOT into Pandas DataFrames with a non-trivial MultiIndex. Now, it takes advantage of awkward-pandas to put ragged (and more complex) Awkward Arrays directly into Pandas columns.

If you want the old behavior, you can read data using library="ak" to get an Awkward Array, and use ak.to_dataframe to "explode" the data into a MultiIndex.

TTree-reading with AwkwardForth

@aryan26roy added a new code path to the TTree-reading routines to read them with AwkwardForth instead of pure Python. Users won't see any interface changes due to this code, but the performance of reading TBranches with AsObject or AsStrings Interpretations should be orders of magnitude faster. For example, std::vector<std::vector<float>> reading is now 400× faster.

Reading RNTuples

@Moelf added a complete reader of RNTuple data with most of an RNTuple-writer in an unmerged pull request (#705). Although the RNTuple format is still in development, this is a very good start at reading RNTuple data, whose structure is a close match to Awkward Arrays (so the translation is more one-to-one than it is for TTrees, for instance).

New features

Bug-fixes and performance

Other

New Contributors

Full Changelog: https://github.com/scikit-hep/uproot5/compare/4.2.4...v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment