y = y[:, np.newaxis]

is nicer