X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=70be6ed43bb8d091d6f2b4565400f368bd75b741;hb=5afa0afc19e6a4695687ea9f0c26fc531e18e5b8;hp=ec3dd1141a9f497acca26f6d09c830420dfb5d5d;hpb=4e966338c00181067c4d10f24b3fcaf288ebe207;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index ec3dd11..70be6ed 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1165,6 +1165,12 @@ class RationalBasisEuclideanJordanAlgebra(FiniteDimensionalEuclideanJordanAlgebr check_field=True, check_axioms=True): + if check_field: + # Abuse the check_field parameter to check that the entries of + # out basis (in ambient coordinates) are in the field QQ. + if not all( all(b_i in QQ for b_i in b.list()) for b in basis ): + raise TypeError("basis not rational") + n = len(basis) vector_basis = basis