]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: use from_vector() instead of call magic in two more places.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Aug 2019 20:24:19 +0000 (16:24 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Aug 2019 20:24:19 +0000 (16:24 -0400)
mjo/eja/eja_element.py

index 107603ce712ecf79d6de89a2e4fd573f17738798..4ed0a59216e7d07eaba9a6aec1b43e91902d3513 100644 (file)
@@ -257,7 +257,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
             sage: y = vector(QQ,[4,5,6])
             sage: x.inner_product(y)
             32
-            sage: J(x).inner_product(J(y))
+            sage: J.from_vector(x).inner_product(J.from_vector(y))
             32
 
         The inner product on `S^n` is `<X,Y> = trace(X*Y)`, where
@@ -1046,7 +1046,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
             raise ValueError("this only works with non-nilpotent elements!")
 
         J = self.subalgebra_generated_by()
-        u = J(self)
+        u = J.from_vector(self.to_vector())
 
         # The image of the matrix of left-u^m-multiplication
         # will be minimal for some natural number s...