-
Notifications
You must be signed in to change notification settings - Fork 19
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
Concatenation on axis=1
with ak.combinations
introduces overtouching
#526
Comments
Are you saying that you need both combinations and concatenate to get this? |
You can do once and concatenate with itself like In [1]: import dask_awkward as dak
...: from coffea.nanoevents import NanoEventsFactory
...:
...: events = NanoEventsFactory.from_root({"https://github.com/CoffeaTeam/coffea/raw/master/tests/samples/nano_dy.root": "Events"}).events()
...:
...: tnp = dak.combinations(events.Electron, 2, fields=["tag", "probe"])
/Users/iason/miniforge3/envs/egamma_dev/lib/python3.10/site-packages/coffea/nanoevents/methods/candidate.py:11: FutureWarning: In version 2024.7.0 (target date: 2024-06-30 11:59:59-05:00), this will be an error.
To raise these warnings as errors (and get stack traces to find out where they're called), run
import warnings
warnings.filterwarnings("error", module="coffea.*")
after the first `import coffea` or use `@pytest.mark.filterwarnings("error:::coffea.*")` in pytest.
Issue: coffea.nanoevents.methods.vector will be removed and replaced with scikit-hep vector. Nanoevents schemas internal to coffea will be migrated. Otherwise please consider using that package!.
from coffea.nanoevents.methods import vector
/Users/iason/miniforge3/envs/egamma_dev/lib/python3.10/site-packages/coffea/nanoevents/schemas/nanoaod.py:243: RuntimeWarning: Missing cross-reference index for FatJet_genJetAK8Idx => GenJetAK8
warnings.warn(
In [2]: zcands = dak.concatenate([tnp, tnp], axis=1)
...: dak.necessary_columns(zcands.tag.pt) But yes, you do need to concatenate. In [3]: dak.necessary_columns(tnp.tag.pt)
Out[3]:
{'from-uproot-b0c009586b4553e84b096eeaee2d1795': frozenset({'Electron_pt',
'nElectron'})} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce:
will give this while it should only need
nElectron
andElectron_pt
:The text was updated successfully, but these errors were encountered: