From 2f83e55614ad1f21e98ae256f4e81eb3b77bc41a Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 25 Jul 2019 20:41:12 -0400 Subject: [PATCH] eja: randomize and fix a bug in the subalgebra_idempotent() test. --- mjo/eja/euclidean_jordan_algebra.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index a469bb0..920ecc9 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1211,12 +1211,11 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): TESTS:: sage: set_random_seed() - sage: J = RealCartesianProductEJA(5) - sage: c = J.random_element().subalgebra_idempotent() - sage: c^2 == c - True - sage: J = JordanSpinEJA(5) - sage: c = J.random_element().subalgebra_idempotent() + sage: J = random_eja() + sage: x = J.random_element() + sage: while x.is_nilpotent(): + ....: x = J.random_element() + sage: c = x.subalgebra_idempotent() sage: c^2 == c True -- 2.44.2