what can be supported in a general Jordan Algebra.
"""
-from itertools import izip, repeat
+from itertools import repeat
from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra
from sage.categories.magmatic_algebras import MagmaticAlgebras
basis = tuple( s.change_ring(field) for s in basis )
self._basis_normalizers = tuple(
~(self.natural_inner_product(s,s).sqrt()) for s in basis )
- basis = tuple(s*c for (s,c) in izip(basis,self._basis_normalizers))
+ basis = tuple(s*c for (s,c) in zip(basis,self._basis_normalizers))
Qs = self.multiplication_table_from_matrix_basis(basis)
# with had entries in a nice field.
return super(MatrixEuclideanJordanAlgebra, self)._charpoly_coeff(i)
else:
- basis = ( (b/n) for (b,n) in izip(self.natural_basis(),
- self._basis_normalizers) )
+ basis = ( (b/n) for (b,n) in zip(self.natural_basis(),
+ self._basis_normalizers) )
# Do this over the rationals and convert back at the end.
J = MatrixEuclideanJordanAlgebra(QQ,
(_,x,_,_) = J._charpoly_matrix_system()
p = J._charpoly_coeff(i)
# p might be missing some vars, have to substitute "optionally"
- pairs = izip(x.base_ring().gens(), self._basis_normalizers)
+ pairs = zip(x.base_ring().gens(), self._basis_normalizers)
substitutions = { v: v*c for (v,c) in pairs }
result = p.subs(substitutions)
# -*- coding: utf-8 -*-
-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(izip(B,self.to_vector()))
+ return W.linear_combination(zip(B,self.to_vector()))
def norm(self):