// Test with the same number of base_points and tangent_vecs
tangent_vecs = self.group.random_uniform(n_samples=n_samples)
base_points = self.group.random_uniform(n_samples=n_samples)
results = metric.exp(tangent_vecs, base_points)
self.assertTrue(np.allclose(results.shape,
(n_samples, self.group.dimension)))
After Change
self.assertTrue(np.allclose(result.shape,
(n_samples, self.group.dimension)))
expected = np.vstack([metric.exp(tangent_vec, one_base_point)
for tangent_vec in n_tangent_vec])
self.assertTrue(np.allclose(expected.shape,
(n_samples, self.group.dimension)))
// Test with the several base point, and one tangent vec
result = metric.exp(one_tangent_vec, n_base_point)
self.assertTrue(np.allclose(result.shape,
(n_samples, self.group.dimension)))
expected = np.vstack([metric.exp(one_tangent_vec, base_point)
for base_point in n_base_point])
self.assertTrue(np.allclose(expected.shape,
(n_samples, self.group.dimension)))
// Test with the same number n of base point and n tangent vec
result = metric.exp(n_tangent_vec, n_base_point)
self.assertTrue(np.allclose(result.shape,
(n_samples, self.group.dimension)))
expected = np.vstack([metric.exp(tangent_vec, base_point)
for tangent_vec, base_point in zip(
n_tangent_vec,
n_base_point)])
self.assertTrue(np.allclose(expected.shape,