Skip to content

Commit 6e3472b

Browse files
committed
DOC: more comments
Based on @amueller's review
1 parent e42ecd1 commit 6e3472b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sklearn/utils/validation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,13 @@ def check_arrays(*arrays, **options):
269269
elif hasattr(array, 'data'):
270270
array.data = np.asarray(array.data, dtype=dtype)
271271
elif array.dtype != dtype:
272+
# Cast on the required dtype
272273
array = array.astype(dtype)
273274
if not allow_nans:
274275
if hasattr(array, 'data'):
275276
_assert_all_finite(array.data)
276277
else:
278+
# DOK sparse matrices
277279
_assert_all_finite(array.values())
278280
else:
279281
if check_ccontiguous:

0 commit comments

Comments
 (0)