benchmark/code/dataset/preprocess.py
def make_tree_list(out_jet):
    """Create the lists with the trees."""
    jets_tree = list()
    for i in range(len(out_jet)):
        traversal_result = traverse_tree(out_jet[i], extra_info=False)
        tree, content, charge, abs_charge, muon = traversal_result
        tree=np.asarray([tree])
        tree=np.asarray([np.asarray(e).reshape(-1,2) for e in tree])
        content=np.asarray([content])
        content=np.asarray([np.asarray(e).reshape(-1,4) for e in content])
        mass=out_jet[i].m()
        pt=out_jet[i].pt()
        jets_tree.append((tree, content, mass, pt))
        if i > 0:
            logging.info('More than 1 reclustered jet')
        # TODO: Is it intended that the loop always returns after the first
        # entry???
        return jets_tree
Create the lists with the trees.
Create the lists with the trees.
Create the lists with the trees .
def make_tree_list(out_jet):
    jets_tree = list()
    for i in range(len(out_jet)):
        traversal_result = traverse_tree(out_jet[i], extra_info=False)
        tree, content, charge, abs_charge, muon = traversal_result
        tree=np.asarray([tree])
        tree=np.asarray([np.asarray(e).reshape(-1,2) for e in tree])
        content=np.asarray([content])
        content=np.asarray([np.asarray(e).reshape(-1,4) for e in content])
        mass=out_jet[i].m()
        pt=out_jet[i].pt()
        jets_tree.append((tree, content, mass, pt))
        if i > 0:
            logging.info('More than 1 reclustered jet')
        return jets_tree
def make_tree_list ( out_jet ) : jets_tree = list ( ) for i in range ( len ( out_jet ) ) : traversal_result = traverse_tree ( out_jet [ i ] , extra_info = False ) tree , content , charge , abs_charge , muon = traversal_result tree = np . asarray ( [ tree ] ) tree = np . asarray ( [ np . asarray ( e ) . reshape ( - 1 , 2 ) for e in tree ] ) content = np . asarray ( [ content ] ) content = np . asarray ( [ np . asarray ( e ) . reshape ( - 1 , 4 ) for e in content ] ) mass = out_jet [ i ] . m ( ) pt = out_jet [ i ] . pt ( ) jets_tree . append ( ( tree , content , mass , pt ) ) if i > 0 : logging . info ( 'More than 1 reclustered jet' ) return jets_tree
Create the lists with the trees.
Create the lists with the trees .
"""Create the lists with the trees.""" # TODO: Is it intended that the loop always returns after the first # entry???
out_jet