@AlexanderFabisch , it seems that you are not fully consistent :). In your PR on learning curves you defined a '_fit' function that avoids the if/else clause that you have here. Here you are not using it.

I must admit that I don't like such a little 4-liner function, as I find it obfuscates the code. In addition, other contributors tend to not see it, and reinvent it.

Anyhow, in my opinion, I think that you should choose either to remove it from the grid_search.py file, or to use it here.