From: Michael Orlitzky Date: Sun, 25 Aug 2019 22:39:15 +0000 (-0400) Subject: eja: speed up the computation of element powers. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;ds=sidebyside;h=784a0dc84c5a735c16d604ead783899f5d718c51;p=sage.d.git eja: speed up the computation of element powers. --- diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 85d4571..7c86183 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -78,7 +78,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): elif n == 1: return self else: - return (self.operator()**(n-1))(self) + return (self**(n-1))*self def apply_univariate_polynomial(self, p):