X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=4cbc88eb883d78bb5e85a9860b53330c9b980845;hb=70a8227fc27d6de57cdabfb7fd1f1a7c00a74132;hp=8ca501d6ba944a539901d384a78a5c8a0f45a7ca;hpb=3f8818f3eca0b2ea388130ff805875012cf902cb;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 8ca501d..4cbc88e 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -2292,6 +2292,16 @@ class JordanSpinEJA(BilinearFormEJA): 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): """