pycharm中遇到问题: AttributeError: 'DataFrame' object has no attribute 'flatten'

原来代码:

y_test_predict =y_test_predict.flatten()

解决办法:

原因是需要将类型转化为array

y_test_predict =np.array(y_test_predict).flatten()

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐