From: Michael Orlitzky Date: Wed, 3 Mar 2021 12:40:46 +0000 (-0500) Subject: eja: add another _all2list doctest. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c41c7f2a94370c11d478dbdb22e77cfa30298eb2;p=sage.d.git eja: add another _all2list doctest. --- diff --git a/mjo/eja/eja_utils.py b/mjo/eja/eja_utils.py index 6690a80..2402d9f 100644 --- a/mjo/eja/eja_utils.py +++ b/mjo/eja/eja_utils.py @@ -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