np.squeeze would be safer I think. 
np.squeeze will cause shape error later if y.shape[1] > 1
IIUC