我是靠谱客的博主 快乐钢笔,这篇文章主要介绍TypeError: ufunc ‘isnan‘ not supported for the input types, and the inputs could not be...可能的原因记录TypeError: ufunc ‘isnan’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting ru,现在分享给大家,希望可以做个参考。
TypeError: ufunc ‘isnan’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’ 可能的原因记录
在博客上看了很多关于这个报错的内容,但是没有人提到可能导致这一问题的情况:
如果在使用Sklearn库的OneHotEncoder时,碰见上述bug,则表明输入的categories并不是全部的类型。
如果需要输入类型,请输入完整的类型!请务必检查每个输入。
- 其他知识点:OneHot的categories不支持两种类型同时在一起。要么是都是int,要么都是str!
最后
以上就是快乐钢笔最近收集整理的关于TypeError: ufunc ‘isnan‘ not supported for the input types, and the inputs could not be...可能的原因记录TypeError: ufunc ‘isnan’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting ru的全部内容,更多相关TypeError:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复