Skip to content

Commit 85d7eda

Browse files
committed
MAINT make it explicit that additive_chi2_kernel does not accept sparse matrix
1 parent 22ca6ff commit 85d7eda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/metrics/pairwise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ def additive_chi2_kernel(X, Y=None):
15551555
International Journal of Computer Vision 2007
15561556
https://hal.archives-ouvertes.fr/hal-00171412/document
15571557
"""
1558-
X, Y = check_pairwise_arrays(X, Y)
1558+
X, Y = check_pairwise_arrays(X, Y, accept_sparse=False)
15591559
if (X < 0).any():
15601560
raise ValueError("X contains negative values.")
15611561
if Y is not X and (Y < 0).any():

0 commit comments

Comments
 (0)