8000 FIX Mixed bool dtype in pandas (#17008) · scikit-learn/scikit-learn@9f015c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f015c8

Browse files
authored
FIX Mixed bool dtype in pandas (#17008)
1 parent 5435408 commit 9f015c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/utils/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def check_array(array, accept_sparse=False, *, accept_large_sparse=True,
507507
# pandas boolean dtype __array__ interface coerces bools to objects
508508
for i, dtype_iter in enumerate(dtypes_orig):
509509
if dtype_iter.kind == 'b':
510-
dtypes_orig[i] = np.object
510+
dtypes_orig[i] = np.dtype(np.object)
511511

512512
if all(isinstance(dtype, np.dtype) for dtype in dtypes_orig):
513513
dtype_orig = np.result_type(*dtypes_orig)

0 commit comments

Comments
 (0)
0