same as `vals.ndim == 1`