`r2[np.logical_and(np.logical_not(nonzero_denominator), nonzero_numerator )] = 0.`