I think this should be `if 0.0 < n_components <= self.kept_variance_ratio:`...