From 3f49e3bf2b85b1918c1abb0e8973a6f203dabc86 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 12 Mar 2021 09:29:33 -0500 Subject: [PATCH] eja: fix recent hasattr() commit. --- mjo/eja/eja_algebra.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(): -- 2.44.2