]> gitweb.michael.orlitzky.com - sage.d.git/blob - mjo/eja/eja_utils.py
eja: begin working on a new constructor.
[sage.d.git] / mjo / eja / eja_utils.py
1 from sage.functions.other import sqrt
2 from sage.matrix.constructor import matrix
3 from sage.modules.free_module_element import vector
4
5 def _mat2vec(m):
6 return vector(m.base_ring(), m.list())
7
8 def _vec2mat(v):
9 return matrix(v.base_ring(), sqrt(v.degree()), v.list())