Closed MellerYaniv closed 6 years ago
This might be important, because in some case I faced that charts are not rendered with Integer value
Is this a Python 2.x only problem?
I guess so.
I used Python 2.7 because my 3.7 environment is broken.
On python 2.7, decimals are discarded when we use /
division between int and int.
So frequency = count / count.sum()
returns 0 in Python 2 for almost case because it is normalized to 0.0 < frequency < 1.0.
(I got array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
for actual data)
On Python 3, results of /
are converted from int to float automatically so this issue won't occur.
Thanks folks. As Python 2 support ends next year, for the sake of not introducing code clutter I'm going to leave the example notebooks Python 3 only compatible for now.
if floats are not enforced frequency in polar_plot will be an array of zeros