Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "urbanaccess/plot.py", line 163, in col_colors
colors = [color_list[cat] for cat in categories]
TypeError: list indices must be integers, not numpy.float64
This happens because, in col_colors, this operation (colors = [color_list[cat] for cat in categories]), requires that each cat not be a float. Yet, if you were to print the type of each prior, you would see that they can result in for loops.
Here is a quick example of what a segment of that would look like, were you to log the type of each:
...which identifies another issue! As you can see in the last logged float, it's a nan. These can't be converted to an integer, so we need to decide what to do with them. I think, at least for the purposes of binning, they should be pruned from the parent data set and removed from the binning process.
Traceback:
This happens because, in
col_colors
, this operation (colors = [color_list[cat] for cat in categories]
), requires that eachcat
not be a float. Yet, if you were to print the type of each prior, you would see that they can result infor
loops.Here is a quick example of what a segment of that would look like, were you to log the type of each:
...which identifies another issue! As you can see in the last logged float, it's a
nan
. These can't be converted to an integer, so we need to decide what to do with them. I think, at least for the purposes of binning, they should be pruned from the parent data set and removed from the binning process.