]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/matrix_vector: fix phi_inv implementation in basis_representation().
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Sep 2020 20:32:43 +0000 (16:32 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Sep 2020 20:32:43 +0000 (16:32 -0400)
mjo/matrix_vector.py

index 4b4818df133a54fc16c6cf7e22b9a0e8eda87796..62b75fd43e2299d605d7000f7c741af6e1bf6690 100644 (file)
@@ -121,7 +121,7 @@ def basis_representation(M):
         `M` or the span of `M` (depending on whether or not ``M``
         is a ``MatrixSpace`` or a basis).
         """
-        return sum( Y[i]*basis[i] for i in range(len(Y)) )
+        return basis_space.linear_combination( zip(Y,basis) )
 
     return (phi, phi_inv)