1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 报错:TypeError: Image data of dtype object cannot be converted to float

报错:TypeError: Image data of dtype object cannot be converted to float

时间:2020-01-24 22:31:47

相关推荐

报错:TypeError: Image data of dtype object cannot be converted to float

一、问题描述

在使用 matplotlib.pyplot 时报错:TypeError: Image data of dtype object cannot be converted to float

二、解决方法

在网上搜索了一下放下总结如下,这里我是第一种问题,读者如果不是,可自行检查一下,别忘了留言告诉我!!

2.1

在转为numpy时忘记加括号了😓

正确的应该是

读者们在自己写代码时一定要检查一下调用的包里面的方法是否正确!!!!

2.2 路径问题

严格经检在查一下自己图片的路径看是否正确

其他问题如果有读者遇到类似的可以留言在评论区,方便大家总结!!!!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。