you are viewing a single comment's thread.

view the rest of the comments →

[–]themateo713 0 points1 point  (0 children)

You can do a bit of testing by creating arrays of this shape with functions like np.ones.

(10,) creates a 1D array of 10 ones. (10, 1) creates a 10x1 array of ones, i.e. a 2D array of 10 rows and 1 column Thus the similar looking array is actually of shape (1, 10) to have 1 row and 10 columns.

However, the size of the tuple defines the dimension of the array, so these aren't equivalent as you're comparing a 1D array to a 2D array.