From: Michael Orlitzky Date: Fri, 12 Mar 2021 14:29:33 +0000 (-0500) Subject: eja: fix recent hasattr() commit. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=sage.d.git;a=commitdiff_plain;h=3f49e3bf2b85b1918c1abb0e8973a6f203dabc86 eja: fix recent hasattr() commit. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 4a1c6f9..e6aba20 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -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():