float-valued indexing will break everything on numpy >= 1.12
Closed this issue · 4 comments
This warning is popping up in the current tests on python 3:
test_beat.test_beat_functions(<function p_score at 0x7f9f3449a8c8>,) ... /home/travis/build/craffel/mir_eval/mir_eval/beat.py:409: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
The offending code is due to a float-divison /
rather than integer division //
in computing middle_lag
. This is why the warning does not show up in py2.7.
This gives a warning in numpy <= 1.11, but in 1.12 and above, it will throw TypeErrors. Note that 1.12 has not made it into conda yet, so this isn't affecting our test builds, but we should get out ahead of it. Probably there are other points where this comes up, and we should do a thorough audit.
Will look into this in a few weeks. If I am blocking something after then, don't hesitate to ping me.
This one is causing build errors on jams, and holding up a release. Any objection to me fixing it directly and merging? Ought to be a one-liner for beats.
note: the np 1.12 issues are gonna stack up quickly, so it'd be good to get a mir_eval release out ASAP.
This one is causing build errors on jams, and holding up a release. Any objection to me fixing it directly and merging? Ought to be a one-liner for beats.
Fine with me, otherwise I have a paper deadline at the end of the month; I will be available to work on it after then.
note: the np 1.12 issues are gonna stack up quickly, so it'd be good to get a mir_eval release out ASAP.
You mean beyond what's mentioned in this thread?