B = matrix.identity(field, n)
super(JordanSpinEJA, self).__init__(B, field, **kwargs)
+ @classmethod
+ def random_instance(cls, field=AA, **kwargs):
+ """
+ Return a random instance of this type of algebra.
+
+ Needed here to override the implementation for ``BilinearFormEJA``.
+ """
+ n = ZZ.random_element(cls._max_random_instance_size() + 1)
+ return cls(n, field, **kwargs)
+
class TrivialEJA(FiniteDimensionalEuclideanJordanAlgebra):
"""