X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_utils.py;h=cbbf1e3a7bb0f1f66c9820121831d09d76895751;hb=9708043704809263d2bd543de38c46b458b873cb;hp=b6b0a0327c19842ce654023b00bf6e0b9af539a1;hpb=f50d52bf5024f319c8757ece8ad95edd0b49270d;p=sage.d.git diff --git a/mjo/eja/eja_utils.py b/mjo/eja/eja_utils.py index b6b0a03..cbbf1e3 100644 --- a/mjo/eja/eja_utils.py +++ b/mjo/eja/eja_utils.py @@ -1,4 +1,9 @@ +from sage.functions.other import sqrt +from sage.matrix.constructor import matrix from sage.modules.free_module_element import vector def _mat2vec(m): return vector(m.base_ring(), m.list()) + +def _vec2mat(v): + return matrix(v.base_ring(), sqrt(v.degree()), v.list())