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.manifold_tests module¶
-
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_logmap1
(M, a, b)[source]¶ This is a test that:
Exp_a( Log_a(b) ) = b
geometry.manifolds.tests.matrix_groups_tests module¶
geometry.manifolds.tests.pickling_tests module¶
geometry.manifolds.tests.sphere_tests module¶
Module contents¶
-
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