Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

float-valued indexing will break everything on numpy >= 1.12 #235

Closed
bmcfee opened this issue Feb 9, 2017 · 4 comments · Fixed by #236
Closed

float-valued indexing will break everything on numpy >= 1.12 #235

bmcfee opened this issue Feb 9, 2017 · 4 comments · Fixed by #236
Assignees
Labels
Milestone

Comments

@bmcfee
Copy link
Collaborator

bmcfee commented Feb 9, 2017

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.

@bmcfee bmcfee added the bug label Feb 9, 2017
@bmcfee bmcfee added this to the 0.4 milestone Feb 9, 2017
@craffel
Copy link
Collaborator

craffel commented Feb 9, 2017

Will look into this in a few weeks. If I am blocking something after then, don't hesitate to ping me.

@bmcfee
Copy link
Collaborator Author

bmcfee commented Feb 11, 2017

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.

@bmcfee
Copy link
Collaborator Author

bmcfee commented Feb 11, 2017

note: the np 1.12 issues are gonna stack up quickly, so it'd be good to get a mir_eval release out ASAP.

@bmcfee bmcfee modified the milestones: 0.5, 0.4 Feb 11, 2017
@craffel
Copy link
Collaborator

craffel commented Feb 12, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants