Skip to content

Acessing additional attributes in numba #287

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

You must be logged in to vote

UPDATE. I realized I can do something like the following in order to access the additional attributes.

@nb.njit
def match_fjet(higgses, bquarks, fjets, builder):
    for higgses_event, bquarks_event, fjets_event in zip(higgses, bquarks, fjets):
        builder.begin_list()
        for higgs, higgs_idx in zip(higgses_event, higgses_event.idx):
            match_idx = -1
            bdaughters = []
            print(bquarks_event)
            for bquark, bquark_m1 in zip(bquarks_event, bquarks_event.m1):
                print(bquark)
                if bquark_m1 == higgs_idx:
                    bdaughters.append(bquark)
            for i, fjet in enumerate(fjets_event):
                dr_h =

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jmduarte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant