]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: fix computation of the max test case sizes.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 24 Aug 2019 02:08:53 +0000 (22:08 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 24 Aug 2019 02:08:53 +0000 (22:08 -0400)
mjo/eja/eja_algebra.py

index ae5baa0eff4a64dac97944bbdaf5a8ec132495bd..80147dfa62ca0ab408d6da2f5a7ee047eb788f05 100644 (file)
@@ -694,7 +694,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
             # not worry about it.
             raise NotImplementedError
 
-        n = ZZ.random_element(1, cls._max_test_case_size())
+        n = ZZ.random_element(cls._max_test_case_size()) + 1
         return cls(n, field, **kwargs)
 
 
@@ -899,7 +899,7 @@ class MatrixEuclideanJordanAlgebra(FiniteDimensionalEuclideanJordanAlgebra):
     def _max_test_case_size():
         # Play it safe, since this will be squared and the underlying
         # field can have dimension 4 (quaternions) too.
-        return 3
+        return 2
 
     @classmethod
     def _denormalized_basis(cls, n, field):
@@ -1138,7 +1138,7 @@ class RealSymmetricEJA(RealMatrixEuclideanJordanAlgebra):
 
     @staticmethod
     def _max_test_case_size():
-        return 5 # Dimension 10
+        return 4 # Dimension 10