From: Michael Orlitzky Date: Sun, 22 Nov 2020 16:03:16 +0000 (-0500) Subject: eja: fix one() in the trivial HadamardEJA. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=7473b9edbbba0d2be79e4d7aeb2114d1a0090a78;p=sage.d.git eja: fix one() in the trivial HadamardEJA. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index e436bf1..c40c8be 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -2070,7 +2070,11 @@ class HadamardEJA(RationalBasisEuclideanJordanAlgebra): check_axioms=False, **kwargs) self.rank.set_cache(n) - self.one.set_cache( sum(self.gens()) ) + + if n == 0: + self.one.set_cache( self.zero() ) + else: + self.one.set_cache( sum(self.gens()) ) @staticmethod def _max_random_instance_size():