if elt.parent().superalgebra() == self:
return elt.superalgebra_element()
- try:
- # Try to convert a vector into a column-matrix...
+ if hasattr(elt, 'column'):
+ # Convert a vector into a column-matrix...
elt = elt.column()
- except (AttributeError, TypeError):
- # and ignore failure, because we weren't really expecting
- # a vector as an argument anyway.
- pass
if elt not in self.matrix_space():
raise ValueError(msg)