From 7a56ac05363d194c6b7c47d7ae51321df5d8ad1f Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Nov 2018 15:21:16 -0400 Subject: [PATCH] mjo/matrix_vector.py: make tests work with PYTHONPATH="." --- mjo/matrix_vector.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mjo/matrix_vector.py b/mjo/matrix_vector.py index 49d112a..055e4aa 100644 --- a/mjo/matrix_vector.py +++ b/mjo/matrix_vector.py @@ -25,7 +25,11 @@ def isomorphism(matrix_space): The inverse mapping ``phi_inverse`` will go the other way. - EXAMPLES: + SETUP:: + + sage: from mjo.matrix_vector import isomorphism + + EXAMPLES:: sage: M = MatrixSpace(QQ,4,4) sage: (p, p_inv) = isomorphism(M) @@ -72,6 +76,10 @@ def matrix_of_transformation(T, V): matrix that represents ``T`` with respect to the standard basis of ``V``. + SETUP:: + + sage: from mjo.matrix_vector import isomorphism, matrix_of_transformation + EXAMPLES: The matrix of a transformation on a simple vector space should be @@ -116,7 +124,7 @@ def matrix_of_transformation(T, V): """ n = V.dimension() - B = V.basis() + B = list(V.basis()) def inner_product(v, w): # An inner product function that works for both matrices and -- 2.44.2