Skip to content

TypeError in tree_cluster_hist.py recirsive tree traversal #1

@heikomuller

Description

@heikomuller

I get the following error when running https://github.com/diana-hep/TreeNiN/blob/master/code/top_reference_dataset/toptag_reference_dataset_Tree.py:

TypeError: list indices must be integers or slices, not float

It appears that the error occurs at

My fix is to cast the value of the division to int, i.e.,

id = int(len(tree)/2)

Note: I'm using Python 3.7 instead of 2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions