Difference between Numpy (n,) and (n, 1) notation [Difference between horizontal vector and vertical vector]
Introduction
If you look at the shape of the Numpy ndarray array, you'll see notations such as (n, 1) and (n,). I wondered, "Isn't [,] or [1] unnecessary for a one-dimensional array?"
Conclusion
(n,) is an array of horizontal vectors (just a one-dimensional array)
(n, 1) is an array of vertical vectors
![コメント 2019-12-22 203229.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/526723/a35b6050-da30-c610-fec4-2037edc8a8b4.png)
- One-dimensional arrays cannot be converted to transpose with .T, so reshape must be used.