]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add another _all2list doctest.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 3 Mar 2021 12:40:46 +0000 (07:40 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 3 Mar 2021 12:40:46 +0000 (07:40 -0500)
mjo/eja/eja_utils.py

index 6690a80d395f000e3d8e588b3c0d407f8b7678c6..2402d9f0e5f6d1b174690688b8f9b2d7f17eba61 100644 (file)
@@ -86,6 +86,16 @@ def _all2list(x):
         sage: _all2list(OctonionMatrixAlgebra(1).one())
         [1, 0, 0, 0, 0, 0, 0, 0]
 
+    ::
+
+        sage: V1 = VectorSpace(QQ,2)
+        sage: V2 = OctonionMatrixAlgebra(1,field=QQ)
+        sage: C = cartesian_product([V1,V2])
+        sage: x1 = V1([3,4])
+        sage: y1 = V2.one()
+        sage: _all2list(C( (x1,y1) ))
+        [3, 4, 1, 0, 0, 0, 0, 0, 0, 0]
+
     """
     if hasattr(x, 'to_vector'):
         # This works on matrices of e.g. octonions directly, without