Skip to content

Commit

Permalink
using ensure_note_array to handle various performance data in to_mach…
Browse files Browse the repository at this point in the history
…ed_score. (addressing reviewer comment)
  • Loading branch information
manoskary committed Feb 20, 2025
1 parent 6401096 commit 0a2cae9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions partitura/musicanalysis/performance_codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,7 @@ def to_matched_score(
feature_functions=feature_functions,
)

if isinstance(performance, np.ndarray):
p_na = performance
else:
p_na = performance.note_array()
p_na = ensure_notearray(performance)
part_by_id = dict((n["id"], na[na["id"] == n["id"]]) for n in na)
ppart_by_id = dict((n["id"], p_na[p_na["id"] == n["id"]]) for n in p_na)

Expand Down

0 comments on commit 0a2cae9

Please sign in to comment.