From 7473b9edbbba0d2be79e4d7aeb2114d1a0090a78 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 22 Nov 2020 11:03:16 -0500 Subject: [PATCH] eja: fix one() in the trivial HadamardEJA. --- mjo/eja/eja_algebra.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(): -- 2.44.2