From 51004f14e52ee9d29887ca4c9e233a302d1a4fc4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 3 Nov 2020 08:34:36 -0500 Subject: [PATCH] eja: reimplement random_eja() without KnownRankEJA. --- mjo/eja/eja_algebra.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 19db8b0..c06f9e2 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1088,9 +1088,13 @@ def random_eja(field=AA, nontrivial=False): Euclidean Jordan algebra of dimension... """ - eja_classes = KnownRankEJA.__subclasses__() - if nontrivial: - eja_classes.remove(TrivialEJA) + eja_classes = [HadamardEJA, + JordanSpinEJA, + RealSymmetricEJA, + ComplexHermitianEJA, + QuaternionHermitianEJA] + if not nontrivial: + eja_classes.append(TrivialEJA) classname = choice(eja_classes) return classname.random_instance(field=field) -- 2.44.2