Skip to content

Commit eb878d6

Browse files
Resolve a numpy deprecation warning
1 parent 617adaa commit eb878d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/test_utils.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -931,16 +931,17 @@ def test_same_with_or_without_preprocessor(estimator, build_dataset):
931931
assert np.array(output_with_prep == output_with_prep_formed).all()
932932

933933
# test score_pairs
934+
idx1 = np.array([[0, 2],[5, 3]], dtype=int)
934935
output_with_prep = estimator_with_preprocessor.score_pairs(
935-
indicators_to_transform[[[[0, 2], [5, 3]]]])
936+
indicators_to_transform[idx1])
936937
output_without_prep = estimator_without_preprocessor.score_pairs(
937-
formed_points_to_transform[[[[0, 2], [5, 3]]]])
938+
formed_points_to_transform[idx1])
938939
assert np.array(output_with_prep == output_without_prep).all()
939940

940941
output_with_prep = estimator_with_preprocessor.score_pairs(
941-
indicators_to_transform[[[[0, 2], [5, 3]]]])
942+
indicators_to_transform[idx1])
942943
output_without_prep = estimator_with_prep_formed.score_pairs(
943-
formed_points_to_transform[[[[0, 2], [5, 3]]]])
944+
formed_points_to_transform[idx1])
944945
assert np.array(output_with_prep == output_without_prep).all()
945946

946947
# test transform

0 commit comments

Comments
 (0)