Posted on:

25 Apr 2022

2

Is v actually a row vector by default ?

Hi Team,

My understanding is that .shape provides (Number of rows, Number of columns) for a given matrix or vector.

For the vector v = np.array([5, -2, 4]),  v.shape gives  (3, )  => Wouldn't this mean 3 rows and 1 column ?

Therefore, by default isn't v a column vector as opposed to a row vector ?

Appreciate if you could clarify this.

image.png

image.png

0 answers ( 0 marked as helpful)

Submit an answer