Not able to get eta
from MomentumArray4D
#379
-
Dear I'm trying to read the import uproot
import vector
f = uproot.open('file.root:tree')
arrays = f.arrays(["truth_p4"])
truth_lorenz = vector.zip(
{
'px': arrays['truth_p4']['fP']['fX'],
'py': arrays['truth_p4']['fP']['fY'],
'pz': arrays['truth_p4']['fP']['fZ'],
'E': arrays['truth_p4']['fE'],
}
) But if I try to access the truth_lorenz.eta I get the following error
I'm able to access fields for tl in truth_lorenz:
print(tl.eta) I was able to reproduce it with the following code, so I think it is not to deal with import vector
p4 = vector.awk(
[
[{'px':1, 'py':1, 'pz':1, 'E':1}]
]
)
p4.eta What could've caused this issue? Is there a way around it in the My versions are
Best reagrds, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Could you try awkward 1.4.2? This was a bug with an attempt to support zero copy arrays that failed, and was promptly removed in 1.4.2. |
Beta Was this translation helpful? Give feedback.
Could you try awkward 1.4.2? This was a bug with an attempt to support zero copy arrays that failed, and was promptly removed in 1.4.2.