From d0b7ed5b21ca7538400c9f044b1d96d3bb077d23 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 28 Nov 2024 20:16:43 -0500 Subject: [PATCH] mjo/eja/eja_operator.py: fix test when spin algebra is trivial --- mjo/eja/eja_operator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mjo/eja/eja_operator.py b/mjo/eja/eja_operator.py index 19bcf96..0f1652a 100644 --- a/mjo/eja/eja_operator.py +++ b/mjo/eja/eja_operator.py @@ -775,8 +775,10 @@ class EJAOperator(Map): ....: orthonormalize=False) sage: n = J.dimension() sage: I = identity_matrix(J.base_ring(), 1) - sage: U = random_unitary_matrix(J.base_ring(), n-1) - sage: M = block_matrix(2, [I,0,0,U]) + sage: M = I + sage: if n >= 1: + ....: U = random_unitary_matrix(J.base_ring(), n-1) + ....: M = block_matrix(2, [I,0,0,U]) sage: L = EJAOperator(J,J,M) sage: L.is_isomorphism() True -- 2.49.0