Given the discussion in #2002, we can remove `y.shape[0] > 1`.