numpy中reshap函数参数为-1的情况分析

最近学机器学习的时候,看到这样一段代码:x.reshape(-1,1),一直搞不懂参数-1是什么意思。最后就去看了看官方文档: 我们主要看一下红框框里面的内容: The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that
相关文章
相关标签/搜索