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 85d7eda

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎sklearn/metrics/pairwise.py

Copy file name to clipboardExpand all lines: sklearn/metrics/pairwise.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.