This case is already treated in the function. If the denominator is zero and numerator is zero, then the score is 1. If the denominator is zero and the numerator non-zero, then the score is 0.

This make `r2_score` behave similarly to the `explained_variance_score` function.