what can be supported in a general Jordan Algebra.
"""
-from itertools import repeat
+from itertools import izip, repeat
from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra
from sage.categories.magmatic_algebras import MagmaticAlgebras
(_,x,_,_) = J._charpoly_matrix_system()
p = J._charpoly_coeff(i)
# p might be missing some vars, have to substitute "optionally"
- pairs = zip(x.base_ring().gens(), self._basis_normalizers)
+ pairs = izip(x.base_ring().gens(), self._basis_normalizers)
substitutions = { v: v*c for (v,c) in pairs }
return p.subs(substitutions)
+from itertools import izip
+
from sage.matrix.constructor import matrix
from sage.modules.free_module import VectorSpace
from sage.modules.with_basis.indexed_element import IndexedFreeModuleElement
"""
B = self.parent().natural_basis()
W = self.parent().natural_basis_space()
- return W.linear_combination(zip(B,self.to_vector()))
+ return W.linear_combination(izip(B,self.to_vector()))
def norm(self):