Skip to content

Commit 9577a16

Browse files
committed
tests fixed
1 parent 31f1c80 commit 9577a16

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

mlscorecheck/aggregated/_generate_problems.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def generate_dataset_folding_multiclass(
437437

438438
# if aggregation == 'som':
439439
scores = calculate_multiclass_scores(
440-
np.sum(np.ndarray(samples), axis=0),
440+
np.sum(np.array(samples), axis=0),
441441
average=average,
442442
additional_symbols={"beta_positive": 2, "beta_negative": 2},
443443
rounding_decimals=rounding_decimals,

tests/individual/test_problem_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ def test_sample_multiclass_dataset(random_seed):
103103
assert len(dataset) == len(sample)
104104
sums = np.sum(sample, axis=1)
105105

106-
assert np.all(sums == np.ndarray(list(dataset.values())))
106+
assert np.all(sums == np.array(list(dataset.values())))

tests/individual/test_tptn_solutions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_tptn_solutions(figure: str, score: str, zeros: list, random_state: int)
6565
):
6666
return
6767

68-
val = np.ndarray(val)
68+
val = np.array(val)
6969
assert np.any(np.abs(evaluation[figure] - val) < 1e-8)
7070

7171

@@ -116,7 +116,7 @@ def test_tptn_solutions_failure(figure: str, score: str, random_state: int):
116116
assert True
117117
return
118118

119-
val = np.ndarray(val)
119+
val = np.array(val)
120120
assert np.all(np.abs(evaluation[figure] - val) > 1e-8)
121121

122122
scores[score] = 0

tests/scores/test_calculate_scores.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_calculate_multiclass_scores(average):
4646
Args:
4747
average (str): the mode of averaging
4848
"""
49-
confm = np.ndarray([[5, 8, 3], [3, 10, 2], [2, 4, 11]])
49+
confm = np.array([[5, 8, 3], [3, 10, 2], [2, 4, 11]])
5050
scores = calculate_multiclass_scores(
5151
confusion_matrix=confm,
5252
additional_symbols={"beta_positive": 2, "beta_negative": 2},

0 commit comments

Comments
 (0)