-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
EasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolve
Description
Description
Since 0.17 accept_sparse can be any type without any exception being raised. It would be great to add a test like this and make sure that we get an exception. Also I am not sure whether we accept accept_sparse=True. Looking at the code we do handle the specific case of accept_sparse=False. If we accept booleans at the very least the docstring should be amended.
Steps/Code to Reproduce
from scipy import sparse
from sklearn.utils import check_array
class MyClass(object): pass
garbage_parameter = MyClass()
check_array(sparse.csr_matrix([1, 2]), accept_sparse=garbage_parameter)Expected Results
Some exception being raised because the input parameter does not mean anything
Actual Results
No exception raised
Metadata
Metadata
Assignees
Labels
EasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolve