Closed broukema closed 3 years ago
Thanks @broukema . I'll be having a look and updating a number of things soon. Appreciate the feedback.
hi @darrencroton - I saw you implemeted this in commit 0fec63735eaa , so I'll close this issue. :)
Thanks. Sorry it took so long! Fell off my radar.
In pull request https://github.com/darrencroton/sage/pull/14 I've proposed a bug fix for commit a186562 . It seems to me that 2be3027 should fix the bug. Just to repeat the bug report here (also give in the pull request), since this is the Issues section:
Python 2.7.12 tolerates feeding floats to the
np.histogram
function with a warning that the behaviour will soon be deprecated. Consistently with that warning, 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. Theint
function is needed too. In general, usingint(floor(x))
is not the same asint(x)
, sinceint(floor(-2.7))
is-3
whileint(-2.7)
is-2
, at least in fortran and C, so it could be the same in python. For positive floats,int(x)
should be OK, I presume.