From: Michael Orlitzky Date: Fri, 23 Aug 2019 15:25:21 +0000 (-0400) Subject: eja: remove pointless __class__ from static method invocations. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=6c983c4d14a02b4eff37fd2a07ae6b32b93e611c;p=sage.d.git eja: remove pointless __class__ from static method invocations. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index b439ff9..d90d3f2 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -435,7 +435,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): """ X = x.natural_representation() Y = y.natural_representation() - return self.__class__.natural_inner_product(X,Y) + return self.natural_inner_product(X,Y) def is_trivial(self): @@ -798,7 +798,7 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: y = J.random_element() sage: X = x.natural_representation() sage: Y = y.natural_representation() - sage: x.inner_product(y) == J.__class__.natural_inner_product(X,Y) + sage: x.inner_product(y) == J.natural_inner_product(X,Y) True """ @@ -1366,8 +1366,7 @@ class RealSymmetricEJA(FiniteDimensionalEuclideanJordanAlgebra): field = NumberField(p, 'sqrt2', embedding=RLF(2).sqrt()) S = [ s.change_ring(field) for s in S ] self._basis_normalizers = tuple( - ~(self.__class__.natural_inner_product(s,s).sqrt()) - for s in S ) + ~(self.natural_inner_product(s,s).sqrt()) for s in S ) S = tuple( s*c for (s,c) in zip(S,self._basis_normalizers) ) Qs = _multiplication_table_from_matrix_basis(S) @@ -1470,8 +1469,7 @@ class ComplexHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra): field = NumberField(p, 'sqrt2', embedding=RLF(2).sqrt()) S = [ s.change_ring(field) for s in S ] self._basis_normalizers = tuple( - ~(self.__class__.natural_inner_product(s,s).sqrt()) - for s in S ) + ~(self.natural_inner_product(s,s).sqrt()) for s in S ) S = tuple( s*c for (s,c) in zip(S,self._basis_normalizers) ) Qs = _multiplication_table_from_matrix_basis(S) @@ -1582,8 +1580,7 @@ class QuaternionHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra): field = NumberField(p, 'sqrt2', embedding=RLF(2).sqrt()) S = [ s.change_ring(field) for s in S ] self._basis_normalizers = tuple( - ~(self.__class__.natural_inner_product(s,s).sqrt()) - for s in S ) + ~(self.natural_inner_product(s,s).sqrt()) for s in S ) S = tuple( s*c for (s,c) in zip(S,self._basis_normalizers) ) Qs = _multiplication_table_from_matrix_basis(S) @@ -1699,7 +1696,7 @@ class JordanSpinEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: y = J.random_element() sage: X = x.natural_representation() sage: Y = y.natural_representation() - sage: x.inner_product(y) == J.__class__.natural_inner_product(X,Y) + sage: x.inner_product(y) == J.natural_inner_product(X,Y) True """