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: lazily project union contents #2913

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Dec 21, 2023

This fixes #2911 by changing the projection policy of unions, as described in #2911 (comment)

ping @lgray

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a9c2e3b) 81.98% compared to head (b647a64) 81.98%.

Additional details and impacted files
Files Coverage Δ
src/awkward/contents/unionarray.py 85.22% <100.00%> (ø)
src/awkward/operations/ak_enforce_type.py 81.97% <100.00%> (ø)

... and 1 file with indirect coverage changes

@lgray
Copy link
Contributor

lgray commented Dec 21, 2023

Excellent, the test case is fixed up:

/Users/lgray/coffea-dev/coffea/src/coffea/nanoevents/schemas/nanoaod.py:243: RuntimeWarning: Missing cross-reference index for FatJet_genJetAK8Idx => GenJetAK8
  warnings.warn(
{'from-uproot-b1b15c47a073739766e8fd9b6aac75c1': frozenset({'Electron_eta', 'Electron_pt', 'Muon_eta', 'Electron_charge', 'Electron_mass', 'Muon_phi', 'Muon_pt', 'nElectron', 'Electron_phi', 'nMuon', 'Muon_mass', 'Muon_charge'})}
[[], [59.1], [120, 103], [21.3, 17.2], [154, ...], ..., [], [15.4], [], []]

as is the full example from the benchmarks:
image

@agoose77 agoose77 merged commit 8612633 into main Dec 27, 2023
38 checks passed
@agoose77 agoose77 deleted the agoose77/fix-touching-broadcast-union branch December 27, 2023 15:53
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.

Broadcasting of unions overtouches data
2 participants