In numpy what is the difference between a row vector \text{a = numpy.array([1, 2, 3])} and a 2D array \text{b = numpy.array([[1, 2, 3]])} of 1 row and 3 columns?
Or have I got my numpy code wrong?
I got some good answers from ChatGPT.
In numpy what is the difference between a row vector \text{a = numpy.array([1, 2, 3])} and a 2D array \text{b = numpy.array([[1, 2, 3]])} of 1 row and 3 columns?
Or have I got my numpy code wrong?
I got some good answers from ChatGPT.
The 1st example is a single numpy array.
The 2nd example is a numpy array with 1 element, which consists of a second numpy array.
Thanks.