-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dask failing for TTrees with duplicate TBranch names (#1189)
* fix: dask failing for TTrees with duplicate TBranch names * style: pre-commit fixes * Update _dask.py * Test file name update * preserve order in `common_keys` while dropping duplicates --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jim Pivarski <[email protected]>
- Loading branch information
1 parent
e47badf
commit f137305
Showing
3 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot5/blob/main/LICENSE | ||
|
||
import pytest | ||
import uproot | ||
import skhep_testdata | ||
|
||
|
||
def test_dask_duplicated_keys(): | ||
|
||
lazy = uproot.dask( | ||
skhep_testdata.data_path("uproot-metadata-performance.root") + ":Events" | ||
) | ||
materialized = lazy.FatJet_btagDDBvLV2.compute() | ||
|
||
lazy = uproot.dask(skhep_testdata.data_path("uproot-issue513.root") + ":Delphes") | ||
materialized = lazy.Particle.compute() | ||
|
||
lazy = uproot.dask( | ||
skhep_testdata.data_path("uproot-issue443.root") + ":muonDataTree" | ||
) | ||
materialized = lazy.hitEnd.compute() |