]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: allow random_eja() to take a "field" argument.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 30 Aug 2019 15:48:59 +0000 (11:48 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 30 Aug 2019 15:48:59 +0000 (11:48 -0400)
mjo/eja/eja_algebra.py

index 7a65fabdcfcd4adf9c2369dd7d64da50e17b1bd3..2c689d79d3c85d5d6f4d0daca39ca3f0e649540d 100644 (file)
@@ -852,7 +852,7 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
         return x.to_vector().inner_product(y.to_vector())
 
 
-def random_eja():
+def random_eja(field=QQ):
     """
     Return a "random" finite-dimensional Euclidean Jordan Algebra.
 
@@ -889,7 +889,7 @@ def random_eja():
 
     """
     classname = choice(KnownRankEJA.__subclasses__())
-    return classname.random_instance()
+    return classname.random_instance(field=field)