From: Michael Orlitzky Date: Thu, 25 Feb 2021 23:52:11 +0000 (-0500) Subject: eja: fix a randomly failing (in dimension zero) test. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5631bdae846420eb81bd193e2b568abb2d31af4b;p=sage.d.git eja: fix a randomly failing (in dimension zero) test. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 3b64ddd..d012dd8 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -601,18 +601,13 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): TESTS: - Ensure that we can convert any element of the two non-matrix - simple algebras (whose matrix representations are columns) - back and forth faithfully:: + Ensure that we can convert any element back and forth + faithfully between its matrix and algebra representations:: sage: set_random_seed() - sage: J = HadamardEJA.random_instance() - sage: x = J.random_element() - sage: J(x.to_vector().column()) == x - True - sage: J = JordanSpinEJA.random_instance() + sage: J = random_eja() sage: x = J.random_element() - sage: J(x.to_vector().column()) == x + sage: J(x.to_matrix()) == x True We cannot coerce elements between algebras just because their @@ -628,7 +623,6 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): Traceback (most recent call last): ... ValueError: not an element of this algebra - """ msg = "not an element of this algebra" if elt in self.base_ring():