diff --git a/.github/environment-minimal.yml b/.github/environment-minimal.yml index 9aa18320..731d4038 100644 --- a/.github/environment-minimal.yml +++ b/.github/environment-minimal.yml @@ -4,7 +4,7 @@ channels: - defaults dependencies: - pip - - numpy ==1.7.0 + - numpy ==1.14.0 - scipy ==1.0.0 - matplotlib==2.1.0 - pytest diff --git a/.github/environment.yml b/.github/environment.yml index 9a5239a4..4604b19b 100644 --- a/.github/environment.yml +++ b/.github/environment.yml @@ -4,7 +4,7 @@ channels: - defaults dependencies: - pip - - numpy >=1.7.0 + - numpy >=1.14.0 - scipy >=1.0.0 - matplotlib>=2.1.0 - pytest diff --git a/mir_eval/transcription_velocity.py b/mir_eval/transcription_velocity.py index ee9b3a12..82c61ee2 100644 --- a/mir_eval/transcription_velocity.py +++ b/mir_eval/transcription_velocity.py @@ -210,6 +210,7 @@ def match_notes( slope, intercept = np.linalg.lstsq( np.vstack([est_matched_velocities, np.ones(len(est_matched_velocities))]).T, ref_matched_velocities, + rcond=None )[0] # Re-scale est velocities to match ref est_matched_velocities = slope * est_matched_velocities + intercept diff --git a/setup.cfg b/setup.cfg index 0e92b03f..2ad745e3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,7 +46,7 @@ classifiers = packages = find: keywords = audio music mir dsp install_requires = - numpy >= 1.7.0 + numpy >= 1.14.0 scipy >= 1.0.0 [options.extras_require] diff --git a/tests/data/transcription_velocity/output2.json b/tests/data/transcription_velocity/output2.json index 7e4ee32f..57e7b478 100644 --- a/tests/data/transcription_velocity/output2.json +++ b/tests/data/transcription_velocity/output2.json @@ -1 +1 @@ -{"Precision": 0.1761055081458495, "Recall": 0.15655172413793103, "F-measure": 0.16575392479006937, "Average_Overlap_Ratio": 0.6339212298653343, "Precision_no_offset": 0.5865011636927852, "Recall_no_offset": 0.5213793103448275, "F-measure_no_offset": 0.552026286966046, "Average_Overlap_Ratio_no_offset": 0.4720752936805029} \ No newline at end of file +{"Precision": 0.17532971295577968, "Recall": 0.15586206896551724, "F-measure": 0.16502373128879153, "Average_Overlap_Ratio": 0.6346439422322657, "Precision_no_offset": 0.5865011636927852, "Recall_no_offset": 0.5213793103448275, "F-measure_no_offset": 0.552026286966046, "Average_Overlap_Ratio_no_offset": 0.4720752936805029} \ No newline at end of file diff --git a/tests/test_transcription_velocity.py b/tests/test_transcription_velocity.py index b900f7b3..85f9c8bf 100644 --- a/tests/test_transcription_velocity.py +++ b/tests/test_transcription_velocity.py @@ -91,6 +91,8 @@ def test_precision_recall_f1_overlap(): assert np.allclose((p, r, f, o), (1.0, 1.0, 1.0, 1.0)) +# Suppressing this warning. We know the notes are empty, that's not the point. +@pytest.mark.filterwarnings("ignore:.*notes are empty") def test_precision_recall_f1_overlap_empty(): good_i, good_p, good_v = np.array([[0, 1]]), np.array([100]), np.array([1]) bad_i, bad_p, bad_v = np.empty((0, 2)), np.array([]), np.array([])