原文:完美解决 scipy.misc.imread 报错 TypeError: Image data cannot be converted to float

File home harrison anaconda lib python . site packages matplotlib image.py , line , in set data raise TypeError Image data cannot be converted to float TypeError: Image data cannot be converted to fl ...

2019-07-15 11:17 0 1151 推荐指数:

查看详情

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

源码如下: 程序运行时一直在标红的代码处报错,找了好久才发现自己犯了十分愚蠢的错误:路径写错了(同时路径中含有了中文),虽然是路径错了,但一直报的是另外一个错误,所以也很难发现这个问题。 所以当你也出现了同样的错误,可以去检查一下路径中是否含有中文名或者路径写错了。解决 ...

Sat Oct 19 05:33:00 CST 2019 0 2941
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM