TypeError: ufunc 'isnan' not supported for the input types
See original GitHub issueCode to reproduce the error
df = pd.read_csv('/home/shahul/Downloads/train.csv.zip').sample(10000)
y = df['target']
X = df.drop(['target'],axis=1)
a = AutoML(total_time=30,tuning_mode="Normal")
a.fit(X, y)
the error happens due to the use of np.isna()
to object dtype which happens in np.nanmedian()
used in
/mljar-supervised/supervised/preprocessing/preprocessing_utils.py
here I have used PNB Paribas dataset as train
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
TypeError: ufunc 'isnan' not supported for the input types, and ...
TypeError : ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced ; as np filename =...
Read more >ufunc 'isnan' not supported for the input types (0.29.3 ... - GitHub
Hi, We are using the LGBMRegressor with categorical data types ... TypeError: ufunc 'isnan' not supported for the input types (0.29.3) #677.
Read more >How to deal with TypeError: ufunc 'isnan' not supported for the ...
I have dealt with all the Nan values in the features dataframe, then why I am still getting this error? sns.heatmap(features, annot ...
Read more >TypeError: ufunc 'isnan' not supported ... and so on with pandas
TypeError : ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according...
Read more >Pandas : TypeError: ufunc 'isnan' not supported for the input ...
Pandas : TypeError : ufunc ' isnan' not supported for the input types, - seaborn Heatmap [ Beautify Your Computer ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@abtheo thank you for explanations! I see the problem right now.
Practically, to handle objects of unknown content, I see three main use cases we need to cover:
Currently, Cases 1&2 work as expected, however we are not handling Case 3. The ambiguous object type causes Numpy issues all over the place.
As one example, using Case 3 as the input to
AutoML.fit(y=mixed_input_object)
causes the following error to occur at Line 44 ofpreprocessing_utils.py
:As another example, using Case 3 as the input to
AutoML.fit(x=mixed_input_object)
causes problems withto_parquet()
, as seen here: https://github.com/pandas-dev/pandas/issues/21228To solve both of these issues, the very first thing we should do is validate the type of the data. Here is my proposed solution: