摘要: 1、only size-1 arrays can be converted to Python scalars 问题来源:需要把一个float数组A转为int,于是直接在代码中写了 B=int(A),从而报错。 原因:int函数只能对单个数字进行,而不能对一个数组进行 解决方法:用map函数,对数组 阅读全文
posted @ 2020-12-14 15:04 ShineLe 阅读(980) 评论(0) 推荐(0)