-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
warn_on_dtype with DataFrame #10948
Copy link
Copy link
Closed
Labels
Description
Description
warn_on_dtype has no effect when input is a pandas DataFrame
Steps/Code to Reproduce
from sklearn.utils.validation import check_array
import pandas as pd
df = pd.DataFrame([[1, 2, 3], [2, 3, 4]], dtype=object)
checked = check_array(df, warn_on_dtype=True)Expected result:
DataConversionWarning: Data with input dtype object was converted to float64.Actual Results
No warning is thrown
Versions
Linux-4.4.0-116-generic-x86_64-with-debian-stretch-sid
Python 3.6.3 |Anaconda, Inc.| (default, Nov 3 2017, 19:19:16)
[GCC 7.2.0]
NumPy 1.13.1
SciPy 0.19.1
Scikit-Learn 0.20.dev0
Pandas 0.21.0
Reactions are currently unavailable