and passed to scikit-learn"s ``check_array`` with all the additional
arguments.
accept_dask_array = kwargs.pop("accept_dask_array", True)
preserve_pandas_dataframe = kwargs.pop("preserve_pandas_dataframe", False)
accept_dask_dataframe = kwargs.pop("accept_dask_dataframe", False)
accept_unknown_chunks = kwargs.pop("accept_unknown_chunks", False)
accept_multiple_blocks = kwargs.pop("accept_multiple_blocks", False)
After Change
raise TypeError(msg)
if remove_zero_chunks:
if min(array.chunks[0]) == 0:
// scikit-learn does not gracefully handle length-0 chunks
// in some cases (e.g. pairwise_distances).
chunks2 = tuple(x for x in array.chunks[0] if x != 0)