8000 Remove redundant asserts · scikit-learn/scikit-learn@ccae2ae · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ccae2ae

Browse files
committed
Remove redundant asserts
1 parent d8deae5 commit ccae2ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sklearn/neighbors/tests/test_neighbors.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from itertools import product
22

33
import numpy as np
4-
import scipy.sparse as sp
54
from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix,
65
dok_matrix, lil_matrix)
76

@@ -884,10 +883,7 @@ def test_kneighbors_classifier_sparse_target_multioutput():
884883
algorithm=algorithm)
885884
knn_mo.fit(X_train, y_train)
886885
y_pred_mo = knn_mo.predict(X_test)
887-
888-
assert_equal(y_pred_mo.shape, y_test.shape)
889-
assert_true(sp.issparse(y_pred_mo))
890-
assert_array_almost_equal(y_pred_mo.toarray(), y_pred_so)
886+
assert_array_equal(y_pred_mo.toarray(), y_pred_so)
891887

892888
# Check proba
893889
y_pred_proba_mo = knn_mo.predict_proba(X_test)

0 commit comments

Comments
 (0)
0