Skip to content

Commit d56ef15

Browse files
committed
renamed compute_performance_features to make_performance_features to make it uniform with make_note_features.
1 parent 7f7d8b7 commit d56ef15

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

partitura/musicanalysis/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
make_rest_features,
2222
)
2323
from .performance_codec import encode_performance, decode_performance
24-
from .performance_features import compute_performance_features
24+
from .performance_features import make_performance_features
2525
from .note_array_to_score import note_array_to_score
2626

2727

@@ -38,6 +38,6 @@
3838
"decode_performance",
3939
"compute_note_array",
4040
"full_note_array",
41-
"compute_performance_features",
41+
"make_performance_features",
4242
"note_array_to_score"
4343
]

partitura/musicanalysis/performance_features.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
__all__ = [
25-
"compute_performance_features",
25+
"make_performance_features",
2626
]
2727

2828
# ordinal
@@ -32,12 +32,12 @@
3232
class InvalidPerformanceFeatureException(Exception):
3333
pass
3434

35-
def compute_performance_features(score: ScoreLike,
36-
performance: PerformanceLike,
37-
alignment: list,
38-
feature_functions: Union[List, str],
39-
add_idx: bool = True
40-
):
35+
def make_performance_features(score: ScoreLike,
36+
performance: PerformanceLike,
37+
alignment: list,
38+
feature_functions: Union[List, str],
39+
add_idx: bool = True
40+
):
4141
"""
4242
Compute the performance features. This function is defined in the same
4343
style of note_features.make_note_features
@@ -164,9 +164,9 @@ def list_performance_feats_functions():
164164
"""Return a list of all feature function names defined in this module.
165165
166166
The feature function names listed here can be specified by name in
167-
the `compute_performance_features` function. For example:
167+
the `make_performance_features` function. For example:
168168
169-
>>> feature, names = compute_performance_features(score,
169+
>>> feature, names = make_performance_features(score,
170170
performance,
171171
alignment,
172172
['asynchrony_feature'])

tests/test_performance_features.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88
from partitura import load_match
99
from tests import MATCH_EXPRESSIVE_FEATURES_TESTFILES
10-
from partitura.musicanalysis.performance_features import compute_performance_features
10+
from partitura.musicanalysis.performance_features import make_performance_features
1111
import os
1212

1313

@@ -34,9 +34,9 @@ def test_performance_features(self):
3434
('beat_period', '<f4')])
3535
fn = MATCH_EXPRESSIVE_FEATURES_TESTFILES[0]
3636
perf, alignment, score = load_match(filename=fn, create_score=True)
37-
features = compute_performance_features(score,
38-
perf,
39-
alignment,
40-
feature_functions = "all")
37+
features = make_performance_features(score,
38+
perf,
39+
alignment,
40+
feature_functions = "all")
4141

4242
self.assertTrue(np.all(True_array[fields] == features[fields][:3]), f"The expression features don't match the original.")

0 commit comments

Comments
 (0)