8000 Update sklearn/utils/validation.py · alexshacked/scikit-learn@abc3257 · GitHub
[go: up one dir, main page]

Skip to content

Commit abc3257

Browse files
Update sklearn/utils/validation.py
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent ef2c4ee commit abc3257

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/utils/validation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,9 @@ def check_array(array, accept_sparse=False, *, accept_large_sparse=True,
569569
# DataFrame.sparse only supports `to_coo`
570570
array = array.sparse.to_coo()
571571
if array.dtype == np.dtype('object'):
572-
unique_dtypes = set([dt.subtype.name for dt in
573-
array_orig.dtypes])
572+
unique_dtypes = set(
573+
[dt.subtype.name for dt in array_orig.dtypes]
574+
)
574575
if len(unique_dtypes) > 1:
575576
raise ValueError(
576577
"Pandas DataFrame with mixed sparse extension arrays "

0 commit comments

Comments
 (0)
0