geometry.manifolds.tests package

Submodules

geometry.manifolds.tests.checks_generation module

These are very “meta” utils for creating nose tests on the fly.

Here is an example use:

thinghies = {'banana': 'yellow', 'apple': 'red', 'sky': 'blue'}

def thinghies_list():
    return thinghies.keys()

def thinghies_args(x):
    return (x, thinghies[x])

def thinghies_attrs(x):
    return dict(thinghy_name='%s' % x, flavor=thinghies[x])

for_all_thinghies = fancy_test_decorator(lister=thinghies_list,
                                         arguments=thinghies_args,
                                         attributes=thinghies_attrs)

And this is the proper test:

@for_all_thinghies
def check_good_flavor(id_thinghy, flavor):
    print('test for %s %s' % (id_thinghy, flavor))
geometry.manifolds.tests.checks_generation.fancy_test_decorator(lister, arguments=<function <lambda>>, attributes=<function <lambda>>, naming=<function <lambda>>, debug=False)[source]

Creates a fancy decorator for adding checks.

Parameters:
  • lister – a function that should give a list of objects
  • arguments – from object to arguments
  • attributes – (optional) set of attributes for the test

Returns a function that can be used as a decorator.

geometry.manifolds.tests.embedding_test module

geometry.manifolds.tests.embedding_test.check_embed_relation(A, B)[source]
geometry.manifolds.tests.embedding_test.check_embed_relation_cond(A, B)[source]
geometry.manifolds.tests.embedding_test.test_embed_relations()[source]

geometry.manifolds.tests.manifold_tests module

geometry.manifolds.tests.manifold_tests.check_friendly(M, a)[source]
geometry.manifolds.tests.manifold_tests.check_geodesic_consistency(M, a, b)[source]

Check that there is consistency in the geodesics.

This is a test that

x(t) = geodesic( a, b, t)

interpolates between a and b, checking

d(a, x(t)) + d(x(t), b) = d(a,b)
geometry.manifolds.tests.manifold_tests.check_interesting_point_in_manifold(M, p)[source]
geometry.manifolds.tests.manifold_tests.check_logmap1(M, a, b)[source]

This is a test that:

Exp_a( Log_a(b) ) = b

geometry.manifolds.tests.manifold_tests.check_logmap3(M, a, b)[source]
geometry.manifolds.tests.manifold_tests.check_normalize(M, a)[source]

normalize() must be idempotent.

geometry.manifolds.tests.manifold_tests.test_dimensions()[source]

geometry.manifolds.tests.matrix_groups_tests module

geometry.manifolds.tests.matrix_groups_tests.algebra1(M, m)[source]
geometry.manifolds.tests.matrix_groups_tests.algebra2(M)[source]
geometry.manifolds.tests.matrix_groups_tests.algebra_enough(M)[source]
geometry.manifolds.tests.matrix_groups_tests.group_vector_isomorphism(M, p)[source]

geometry.manifolds.tests.pickling_tests module

geometry.manifolds.tests.pickling_tests.check_manifold_pickable(M)[source]

geometry.manifolds.tests.sphere_tests module

geometry.manifolds.tests.sphere_tests.test_wrap_around()[source]

Module contents

geometry.manifolds.tests.get_test_points(M, num_random=2)[source]
geometry.manifolds.tests.list_manifold_point()[source]

Yields all possible (M, point, i, num) tests we have

geometry.manifolds.tests.list_manifold_points()[source]

Yields all possible (M, point1, point2, i, num) tests we have

geometry.manifolds.tests.list_manifolds()[source]
geometry.manifolds.tests.list_mgroup()[source]

Yields all possible (M, point, i, num) tests we have

geometry.manifolds.tests.list_mgroup_point()[source]

Yields all possible (M, point, i, num) tests we have