The for loop is already there in all solvers which don't support multi-target directly! You just need to replace the constant self.alpha by self.alpha[i] where i is the target index in the for loop. As far as I remember, dense_cholesky is the only other solver with direct multi-target support.