![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
20190917
这个作者很懒,什么都没留下…
展开
-
Expected 2D array, got 1D array instead:Reshape your data either using array.reshape(-1, 1) if your
Expected 2D array, got 1D array instead:Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.错误代码:model.fit(x_train,y_train)新版sklearn中,所有数据都应为二维矩阵,独行独列也应是二维。正确代原创 2021-07-08 19:34:22 · 197 阅读 · 0 评论 -
UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels
预测的标签中缺少实际的标签。避免警告的方法如下:import warningswarnings.filterwarnings("ignore")原创 2021-07-08 19:28:14 · 1818 阅读 · 0 评论 -
Manager isn‘t accessible via %s instances“ % cls.__name__
错误代码:yloc = Ylocation().objects.get(word=bag_word)正确代码:yloc = Ylocation.objects.get(word=bag_word)原创 2021-07-07 21:22:31 · 203 阅读 · 1 评论 -
ImportError: Failed to import test module:XXX
ImportError: Failed to import test module:XXX 在unittest.main()语句前添加if __name__ == '__main__':原创 2021-01-29 00:03:41 · 1217 阅读 · 0 评论