Skip to content

RecordArray masks differently than normal Array #1585

Answered by lnoehte
lnoehte asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks a lot for the quick response.

When I saw the shape of mask2 in array2 I already suspected something happening when broadcasting, that I didn't expect.

I also tried it with more than one field, like

array2 = ak.Array(
    [
        {
            'Muon_pt': [53.1, 30.2],
            'Muon_eta': [1.1, 0.2],
        },
        {
            'Muon_pt': [],
            'Muon_eta': [],
        },
        {
            'Muon_pt': [91.7, 88.6, 20.3],
            'Muon_eta': [0.6, -0.5],
        }
    ]
)

I tried to keep the first example simple, because it seems to yield the same result:

array2:
[{Muon_pt: [53.1, 30.2], Muon_eta: [1.1, 0.2], ... 20.3], Muon_eta: [0.6, -0.5]}]
[{'Muon_pt': [5…

Replies: 2 comments 15 replies

Comment options

You must be logged in to vote
2 replies
@agoose77
Comment options

@jpivarski
Comment options

Comment options

You must be logged in to vote
13 replies
@agoose77
Comment options

@lnoehte
Comment options

@lnoehte
Comment options

@agoose77
Comment options

@lnoehte
Comment options

Answer selected by agoose77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants