# TypeError: list indices must be integers or slices, not float #
The only variable used to index is median thus the error probably triggering because median was calculated to be a float. This is unusable for indexing because you can't grab position 4.5 in a list, there is no half position in a list.
To solve this all you have to do is put int(median) wherever it appears or cast it to an int before this line
Can anyone help with this error please:
Scripts\gw_kd_tree.py", line 89, in build_kdtree
node = KDTreeNode [(point=point_list[median], left=build_kdtree(point_list[0:median], depth+1), right=build_kdtree(point_list[median+1:], depth+1))]
TypeError: list indices must be integers or slices, not float