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 · 284 阅读 · 0 评论 -
UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels
预测的标签中缺少实际的标签。 避免警告的方法如下: import warnings warnings.filterwarnings("ignore")原创 2021-07-08 19:28:14 · 1966 阅读 · 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 · 302 阅读 · 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 · 1330 阅读 · 0 评论
分享