]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: fix recent hasattr() commit.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 12 Mar 2021 14:29:33 +0000 (09:29 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 12 Mar 2021 14:29:33 +0000 (09:29 -0500)
mjo/eja/eja_algebra.py

index 4a1c6f94f589c80b9021b71ee01693765aabcaeb..e6aba200a90a0317150bde9093f6a28569d2db74 100644 (file)
@@ -779,8 +779,10 @@ class FiniteDimensionalEJA(CombinatorialFreeModule):
             if elt.parent().superalgebra() == self:
                 return elt.superalgebra_element()
 
-        if hasattr(elt, 'column'):
-            # Convert a vector into a column-matrix...
+        if hasattr(elt, 'sparse_vector'):
+            # Convert a vector into a column-matrix. We check for
+            # "sparse_vector" and not "column" because matrices also
+            # have a "column" method.
             elt = elt.column()
 
         if elt not in self.matrix_space():