np.ravel(alphas)

is enough