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

Writing TTrees is getting the branch type from the pattern of values, not the Awkward type #439

Closed
jpivarski opened this issue Sep 11, 2021 · 0 comments · Fixed by #453
Closed
Labels
bug The problem described is something that must be fixed

Comments

@jpivarski
Copy link
Member

4.1.2

>>> import uproot
>>> import awkward as ak
>>> f = uproot.recreate("whatever.root")
>>> a = ak.Array([[1, 2, 3], [4, 5, 6]])
>>> f["tree"] = {"branch": a}
>>> f["tree"].show()
name                 | typename                 | interpretation                
---------------------+--------------------------+-------------------------------
branch               | int64_t[3]               | AsDtype("('>i8', (3,))")

That should be a branch of type int64_t[] with a counter nbranch because the array type is

2 * var * int64

not

2 * 3 * int64

It doesn't matter that both lists happen to have the same length. (In a subsequent batch, they might not.)

@jpivarski jpivarski added the bug The problem described is something that must be fixed label Sep 11, 2021
@jpivarski jpivarski linked a pull request Sep 27, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The problem described is something that must be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant