When I check the shape of an array using numpy.shape(), I sometimes get (length,1) and sometimes (length,). It looks like the differe
A vector in Python is actually a two-dimensional array. It's just a coincidence that the number of rows is 1 (for row vectors), or the number of columns is 1 (for column vectors).
By contrast, a one-dimensional array is not a vector (neither a row vector nor a column vector). To understand this, think a concept in geometry, scalar. A scalar only has one attribute, which is numerical. By contrast, a vector has two attributes, number and direction. Fortunately, in linear algebra, vectors also have "directions", although only two possible directions - either horizontal or vertical (unlike infinite possible directions in geometry). A one-dimensional array only has numerical meaning - it doesn't show which direction this array is pointing to. This is why we need two-dimensional arrays to describe vectors.