This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
Releases: scikit-hep/uproot3
Releases · scikit-hep/uproot3
2.5.4
2.5.3
2.5.1
2.5.0
Added histograms and functional chains.
Histograms:
- any
TH1*
read from a ROOT file is given user-friendly methods viaTH1Methods
, in exact analogy withTTreeMethods
. - this includes plotting in Bokeh and Holoviews (just trying a few things; of course Matplotlib is more relevant)
- ASCII-art histograms :) .
- histogram fill methods are Numba-accelerated; use them in a compiled Python function.
- can create histograms that are not drawn from a ROOT file (histogram class has a constructor, unlike TTrees, which all come from ROOT files).
Functional chains:
- full suite of map (actually, "define" and "intermediate"), filter, and reduce (general "reduce" and "hist") methods, a la Spark.
- string-valued expressions and Python functions accepted; branches are pulled from ROOT file by free variable names or function parameter names.
- like Spark, the chain is lazily evaluated when it is terminated by an action (filling histograms, general reduction, making arrays). The "define" nodes are substitution expressions and the "intermediate" nodes are reused (and someday cacheable) intermediate arrays.
- "filter" applies cuts at the desired point in the chain.
- all functions in the chain are compiled by Numba in the same LLVM pass, so optimizations can be applied across chain nodes (but not through filters).
- parallel processing semantics implemented but untested. In principle, just passing a Python 3 Executor should parallelize the chain, but use at your own risk until the test suite is done.
- "hists" method produces many histograms in a single pass.
- actions have the same suite of cache options as TTree array methods.
Reference documentation has not been written for these features, nor have a suite of unit tests. Therefore, they should be considered experimental until the docs and tests are done (a future release). Use at your own risk.
2.4.1
2.4.0
Revamped caching options:
cache
is for whole, fully interpreted arrays. Supplying acache
is merely for the convenience of not having to rearrange an analysis script to explicitly save arrays, rather than re-reading them.basketcache
(used to berawcache
) is for raw basket data. Avoids re-reading from the file but goes through all of the machinery of interpretation and joining baskets.keycache
is to avoid re-reading TKey data. A user might want to always do this.
Also, cache access was made thread-safe (assuming the cache objects themselves are thread-safe).
2.3.3
2.3.2
Minor change: all keys()
, values()
, items()
, etc. now return lists, rather than iterators. As in Python 2, there's an iterkeys()
, itervalues()
, iteritems()
of each form.
On the Python command line, it's more convenient to look at a directory listing by f.keys()
than list(f.keys())
.