scikit-hep / uproot3-methods

Pythonic behaviors for non-I/O related ROOT classes.
BSD 3-Clause "New" or "Revised" License
21 stars 28 forks source link

broken __repr__ on ObjectArrays from ChunkedArrays and inconsistent behavior of choose() #67

Open lukasheinrich opened 5 years ago

lukasheinrich commented 5 years ago

i'm not sure whether this is expected or not, but when reading lazily from a tree, and thus operating with ChunkedArrays I can't seem to create ObjectArrays

rather than the above, it seems like the __repr_ method is broken for object arrays created from chunked arrays

screenshot

Also, I noticed that .choose(n) seems to behave differently depending on whether the ObjectArray was created from ChunkedArrays vs JaggedArrays. Is this expected?

jpivarski commented 5 years ago

It's likely that TLorentzVectorArray.from_ptetaphim is naive about array structures other than JaggedArray. That's my first guess. I don't think it's __repr__ that's failing here—I think it might be building the wrong structure. You can look at it with .layout() to see what it's actually built.