you could avoid this branching by forcing y to be 2d before

```
if y.ndim == 1:
     y = y[:, np.newaxis]

alpha_max = np.sqrt(np.sum(Xy**2, axis=1)).max() / (n_samples * l1_ratio)
```