From the 'array' or 'matrix'? Which should I use? section of the Numpy for Matlab Users wiki page:
For array, the vector shapes 1xN, Nx1, and N are all different things. Operations like A[:,1] return a rank-1 array of shape N, not a rank-2 of shape Nx1. Transpose on a rank-1 array does nothing.
Here's an example showing that they are not the same:
>>> import numpy as np
>>> a1 = np.array([1,2,3])
>>> a1
array([1, 2, 3])
>>> a2 = np.array([[1,2,3]]) // Notice the two sets of brackets
>>> a2
array([[1, 2, 3]])
>>> a3 = np.array([[1],[2],[3]])
>>> a3
array([[1],
[2],
[3]])
So, are you sure that all of your arrays are 2d arrays, or are some of them 1d arrays?
If you want to use your command of array[0,:], I would recommend actually using 1xN 2d arrays instead of 1d arrays. Here's an example:
>>> a2 = np.array([[1,2,3]]) // Notice the two sets of brackets
>>> a2
array([[1, 2, 3]])
>>> a2[0,:]
array([1, 2, 3])
>>> b2 = np.array([[1,2,3],[4,5,6]])
>>> b2
array([[1, 2, 3],
[4, 5, 6]])
>>> b2[0,:]
array([1, 2, 3])