Skip to content

Commit

Permalink
write functions do not return any data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Böck committed Apr 5, 2018
1 parent fa842ce commit c4456ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ API relevant changes:
* `DBNBeatTrackingProcessor` expects 1D inputs (#299)
* Moved downbeat and pattern tracking to `features.downbeats` (#316)
* Write/load functions moved to `io` module (#346)
* Write functions do not return any data (#346)
* Evaluation classes expect annotations/detections, cannot handle files (#346)

Other changes:
Expand Down
8 changes: 0 additions & 8 deletions madmom/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ def write_events(events, filename, fmt='%.3f', delimiter='\t', header=''):
# write the events to the output
np.savetxt(filename, np.asarray(events), fmt=fmt, delimiter=delimiter,
header=header)
# also return them
return events


load_onsets = load_events
Expand Down Expand Up @@ -207,8 +205,6 @@ def write_notes(notes, filename, fmt=None, delimiter='\t', header=''):
fmt = delimiter.join(fmt[:notes.shape[1]])
# write the notes
write_events(notes, filename, fmt=fmt, delimiter=delimiter, header=header)
# also return them
return notes


def load_segments(filename):
Expand Down Expand Up @@ -278,7 +274,6 @@ def write_segments(segments, filename, fmt=None, delimiter='\t', header=''):
if fmt is None:
fmt = ['%.3f', '%.3f', '%s']
np.savetxt(filename, segments, fmt=fmt, delimiter=delimiter, header=header)
return segments


load_chords = load_segments
Expand Down Expand Up @@ -321,7 +316,6 @@ def write_key(key, filename):
"""
np.savetxt(filename, [key], fmt='%s')
return key


def load_tempo(filename, split_value=1., sort=None, norm_strengths=None,
Expand Down Expand Up @@ -448,5 +442,3 @@ def write_tempo(tempi, filename, delimiter='\t', mirex=None):
# write to output
np.savetxt(filename, out, fmt=['%.2f', '%.2f', '%.2f'],
delimiter=delimiter)
# also return the tempi & strength
return t1, t2, strength

0 comments on commit c4456ca

Please sign in to comment.