sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.34k stars 452 forks source link

Sparse/dense conversion for polynomials/power series/Laurent series #29474

Open kedlaya opened 4 years ago

kedlaya commented 4 years ago

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.

Component: algebra

Issue created by migration from https://trac.sagemath.org/ticket/29474

mkoeppe commented 4 years ago
comment:1

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

mkoeppe commented 3 years ago
comment:3

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.