Python 2.7.12 tolerates feeding floats to np.histogram
function with a warning that the behaviour will soon be deprecated;
python 2.7.13 gives a fatal error
TypeError: 'numpy.float64' object cannot be interpreted as an index
Using the floor function is not enough, because it
gives float values such as 32.0 instead of integers such as 32.
This commit fixes the bug for me using python 2.7.13-2+deb9u3 (Debian GNU/Linux Stretch, which
is the stable version of Debian).
Python 2.7.12 tolerates feeding floats to np.histogram function with a warning that the behaviour will soon be deprecated; python 2.7.13 gives a fatal error
Using the floor function is not enough, because it gives float values such as 32.0 instead of integers such as 32.
This commit fixes the bug for me using python 2.7.13-2+deb9u3 (Debian GNU/Linux Stretch, which is the stable version of Debian).