AttributeError: ‘numpy.ndarray‘ object has no attribute ‘append‘ python报错

出错如图:AttributeError: ‘numpy.ndarray‘ object has no attribute ‘append‘ python报错_第1张图片
解决方法:
1.数组不支持append,那么解决办法就是等得到了完整的list再统一转为数组;
2.生成一个数组保存列表的数值,不改变原列表

你可能感兴趣的:(错误,python,机器学习,pycharm)