geomstats.test package#

Submodules#

geomstats.test.conf module#

geomstats.test.data module#

class geomstats.test.data.TestData[source]#

Bases: object

Class for TestData objects.

N_RANDOM_POINTS = [1, 2]#
N_SHAPE_POINTS = [1, 4]#
N_TIME_POINTS = [1, 4]#
N_VEC_REPS = [4]#
fail_for_autodiff_exceptions = True#
fail_for_not_implemented_errors = True#
generate_random_data(marks=())[source]#
generate_random_data_with_time(marks=())[source]#
generate_shape_data(marks=())[source]#
generate_tests(test_data, marks=())[source]#

Wrap test data with corresponding marks.

Parameters:
  • test_data (list or dict)

  • marks (list) – pytest marks,

Returns:

data (list or dict) – Tests.

generate_vec_data(marks=())[source]#
generate_vec_data_with_time(marks=())[source]#
skip_all = False#
skip_vec = False#
skips = ()#
tolerances = {}#
trials = 3#
xfails = ()#

geomstats.test.parametrizers module#

geomstats.test.random module#

class geomstats.test.random.EmbeddedSpaceRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: RandomDataGenerator

point_to_project(n_points=1)[source]#
class geomstats.test.random.GammaRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: EmbeddedSpaceRandomDataGenerator

random_point_standard(n_points=1)[source]#
random_tangent_vec_standard(base_point)[source]#
class geomstats.test.random.HeisenbergVectorsRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: VectorSpaceRandomDataGenerator

random_upper_triangular_matrix(n_points=1)[source]#
class geomstats.test.random.HypersphereIntrinsicRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: RandomDataGenerator

random_tangent_vec(base_point)[source]#
class geomstats.test.random.KendalShapeRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: EmbeddedSpaceRandomDataGenerator

random_horizontal_vec(base_point)[source]#
class geomstats.test.random.LieGroupVectorRandomDataGenerator(space, amplitude=1.0)[source]#

Bases: RandomDataGenerator

point_to_project(n_points=1)[source]#
class geomstats.test.random.MatrixVectorSpaceRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: VectorSpaceRandomDataGenerator

random_basis_representation(n_points=1)[source]#
class geomstats.test.random.NFoldManifoldRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: RandomDataGenerator

point_to_project(n_points=1)[source]#
class geomstats.test.random.RandomDataGenerator(space, amplitude=2.0)[source]#

Bases: object

random_point(n_points=1)[source]#
random_tangent_vec(base_point)[source]#
class geomstats.test.random.RankKPSDMatricesRandomDataGenerator(space, amplitude=1.0)[source]#

Bases: RandomDataGenerator

point_to_project(n_points=1)[source]#
class geomstats.test.random.ShapeBundleRandomDataGenerator(space, n_discretized_curves=5)[source]#

Bases: RandomDataGenerator

random_tangent_vec(base_point)[source]#
class geomstats.test.random.VectorSpaceRandomDataGenerator(space, amplitude=2.0)[source]#

Bases: RandomDataGenerator

point_to_project(n_points=1)[source]#
geomstats.test.random.get_random_quaternion(n_points=1)[source]#
geomstats.test.random.get_random_times(n_times, sort=True)[source]#

geomstats.test.test_case module#

geomstats.test.utils module#

class geomstats.test.utils.IdentityPointTransformer[source]#

Bases: PointTransformer

inverse_transform_point(other_point)[source]#
inverse_transform_tangent_vec(other_tangent_vec, other_base_point)[source]#
transform_point(point)[source]#
transform_tangent_vec(tangent_vec, base_point)[source]#
class geomstats.test.utils.PointTransformer[source]#

Bases: ABC

inverse_transform_point(other_point)[source]#
inverse_transform_tangent_vec(other_tangent_vec, other_base_point)[source]#
transform_point(point)[source]#
transform_tangent_vec(tangent_vec, base_point)[source]#
class geomstats.test.utils.PointTransformerFromDiffeo(diffeo)[source]#

Bases: PointTransformer

inverse_transform_point(other_point)[source]#
inverse_transform_tangent_vec(other_tangent_vec, other_base_point)[source]#
transform_point(point)[source]#
transform_tangent_vec(tangent_vec, base_point)[source]#

geomstats.test.vectorization module#

geomstats.test.vectorization.generate_vectorization_data(data, arg_names, expected_name=None, n_reps=2, vectorization_type='sym')[source]#

Create new data with vectorized version of inputs.

Parameters:
  • data (list of dict) – Data. Each to vectorize.

  • arg_names (list) – Name of inputs to vectorize.

  • expected_name (str or list of str) – Output name in case it needs to be repeated.

  • n_reps (int) – Number of times the input points should be repeated.

  • vectorization_type (str) – Possible values are ‘sym’, ‘basic’, or the format ‘repeat-(int)’ (e.g. “repeat-0-2”). ‘sym’: tests all repetition combinations. ‘basic’: tests only no repetition and repetition of all. ‘repeat-(int)’: tests repetition of provided indices.

geomstats.test.vectorization.test_vectorization(self, test_func, n_reps, atol)[source]#

Module contents#