@geomstats.tests.np_and_autograd_only
def test_fit_to_target_explained_variance(self):
    X = self.spd.random_point(n_samples=5)
    target = 0.9
    tpca = TangentPCA(self.spd_metric, n_components=target)
    tpca.fit(X)
    result = (gs.cumsum(tpca.explained_variance_ratio_)[(- 1)] > target)
    expected = True
    self.assertAllClose(result, expected)
@geomstats.tests.np_and_autograd_only
def test_fit_to_target_explained_variance(self):
    X = self.spd.random_point(n_samples=5)
    target = 0.9
    tpca = TangentPCA(self.spd_metric, n_components=target)
    tpca.fit(X)
    result = (gs.cumsum(tpca.explained_variance_ratio_)[(- 1)] > target)
    expected = True
    self.assertAllClose(result, expected)