当前位置:   article > 正文

TypeError: 'float' object is not iterable

typeerror: 'float' object is not iterable

求心率的peason相关系数的时候遇到这个问题:

TypeError: 'float' object is not iterable

解决方法:

 pre_label.extend(output)

type(output)
<class 'float'>


type(pre_label)
<class 'list'>

改成 pre_label.append(output) 就可以了

append 和 expand 区别在哪里 

https://www.cnblogs.com/subic/p/6553187.html

我没从例子上看出来区别

 


 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/199577
推荐阅读
相关标签
  

闽ICP备14008679号