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

TypeError in tree_cluster_hist.py recirsive tree traversal #1

Open
heikomuller opened this issue Jan 9, 2020 · 0 comments
Open

TypeError in tree_cluster_hist.py recirsive tree traversal #1

heikomuller opened this issue Jan 9, 2020 · 0 comments

Comments

@heikomuller
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant