With ``np.shape(y)[0]``, it will fail to recognize a row vector as a 1d vector.