Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

TLorentzVectorArray.p3 and TLorentzVectorArray.boostp3 broken, TLorentzVectorArray.empty_like returns invalid #89

Open
jrueb opened this issue Jul 30, 2020 · 0 comments

Comments

@jrueb
Copy link
Contributor

jrueb commented Jul 30, 2020

Calling empty_like on a TLorentzVectorArray gives invalid results. The returning object's _valid method raises exceptions.
Example:

import awkward
import uproot_methods

a = awkward.fromiter([[1, 2], [3]])
t = uproot_methods.TLorentzVectorArray.from_cartesian(a, a, a, a * 10)
print(t.empty_like())

This causes p3 and boostp3 to break, however it might not be visible in all cases. Slicing for example will make it visible:

t[[True, True]].p3

raises an exception.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant