`Parallel` guarantees the output order to match the input. So you can get `train_scores` and `test_scores` with a reshape. The loop you currently use is hard to read and slow for large `n_samples_range`.