Skip to content

Commit f01c506

Browse files
hrishikeshioGaelVaroquaux
authored andcommitted
Added same for additive_chi2_kernel
1 parent d949425 commit f01c506

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sklearn/metrics/tests/test_pairwise.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def callable_rbf_kernel(x, y, **kwds):
136136
Y_tuples = tuple([tuple([v for v in row]) for row in Y])
137137
K2 = pairwise_kernels(X_tuples, Y_tuples, metric=metric)
138138
assert_array_almost_equal(K1, K2)
139-
139+
140140
# Test with sparse X and Y
141141
X_sparse = csr_matrix(X)
142142
Y_sparse = csr_matrix(Y)
@@ -236,6 +236,7 @@ def test_chi_square_kernel():
236236

237237
# sparse matrices
238238
assert_raises(ValueError, chi2_kernel, csr_matrix(X), csr_matrix(Y))
239+
assert_raises(ValueError, additive_chi2_kernel, csr_matrix(X), csr_matrix(Y))
239240

240241

241242
def test_kernel_symmetry():

0 commit comments

Comments
 (0)