admin管理员组文章数量:1356097
I'm currently reading a neural network project using debug tool in VScode. There is a function
def load_img_name_list(dataset_path):
img_name_list = np.loadtxt(dataset_path, dtype=np.int32)
return img_name_list
I constantly stuck and got ValueError could not convert string '2007_000032' to int32 at row 0, column 1.
. Since my txt file has data like "2007_000032", I'm not surprised.
BUT when I run (NOT debug) it was totally fine?! If I print the first 5 item in the list, it shows image_name_list: [2007000032 2007000039 2007000063 2007000068 2007000121]
.
They both run in the same environment, I'm so confused about what is going on, can anyone help please? Any help is appreciated!!!
本文标签: pythonWeird Behavior of nploadtxt()Stack Overflow
版权声明:本文标题:python - Weird Behavior of np.loadtxt() - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744012607a2575842.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论