Oy mates, I am learning numpy on my own and getting a pretty good handle on it, a few concepts elude me even after reading the documentation though. I am trying to go through this matrix and make every second row have 10s all the way through it. The last line of code is incorrect. I know how to use
Tag: multidimensional-array
Difference between numpy.array shape (R, 1) and (R,)
In numpy, some of the operations return in shape (R, 1) but some return (R,). This will make matrix multiplication more tedious since explicit reshape is required. For example, given a matrix M, if we want to do numpy.dot(M[:,0], numpy.ones((1, R))) where R is the number of rows (of course, the same issue also occurs column-wise). We will get matrices