]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/matrix_vector.py: make tests work with PYTHONPATH="."
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Nov 2018 19:21:16 +0000 (15:21 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Nov 2018 19:21:16 +0000 (15:21 -0400)
mjo/matrix_vector.py

index 49d112a9f832e8849428abab5955a9f779d884d2..055e4aa9d62dd40b6bf082b19bfb0aa2f199444d 100644 (file)
@@ -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