For matrices, it is very easy to pass back and forth between sparse and dense representations.
sage: M = Matrix([[2,3],[4,5]])
sage: M.is_dense()
True
sage: M.is_sparse()
False
sage: M1 = M.sparse_matrix(); parent(M1)
Full MatrixSpace of 2 by 2 sparse matrices over Integer Ring
sage: M2 = M1.dense_matrix(); parent(M2)
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
It should be possible to do similar for polynomials, power series, and Laurent series, for which we also support both sparse and dense representations.
For matrices, it is very easy to pass back and forth between sparse and dense representations.
It should be possible to do similar for polynomials, power series, and Laurent series, for which we also support both sparse and dense representations.
Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/29474