From: Michael Orlitzky Date: Fri, 30 Aug 2019 15:48:59 +0000 (-0400) Subject: eja: allow random_eja() to take a "field" argument. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=251d80b3473331d895be87f736b688f57963a9bb;p=sage.d.git eja: allow random_eja() to take a "field" argument. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 7a65fab..2c689d7 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -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)