[sage-support] Re: sparse linear algebra

2009-09-21 Thread William Stein
On Mon, Sep 21, 2009 at 5:56 AM, Jason Grout wrote: > > Craig Citro wrote: >>> Is there a good reason for such a difference? >>> >> >> I think the only reason is that the vector code in Sage hasn't >> received much attention over the years. William and I talked about >> this a while back, and bas

[sage-support] Re: sparse linear algebra

2009-09-21 Thread Jason Grout
Craig Citro wrote: >> Is there a good reason for such a difference? >> > > I think the only reason is that the vector code in Sage hasn't > received much attention over the years. William and I talked about > this a while back, and basically agreed that it would be best to > rewrite most of the v

[sage-support] Re: sparse linear algebra

2009-09-20 Thread Yann
I made a tiny one line patch, it would be nice of view to review it. http://sagetrac.org/sage_trac/ticket/6968 Yann Results after patching: sage: m=identity_matrix(1000,sparse=True) sage: v=vector([1]*1000,sparse=True) sage: time p = v*m CPU times: user 0.20 s, sys: 0.00 s, total: 0.20 s Wall

[sage-support] Re: sparse linear algebra

2009-09-20 Thread Craig Citro
> Is there a good reason for such a difference? > I think the only reason is that the vector code in Sage hasn't received much attention over the years. William and I talked about this a while back, and basically agreed that it would be best to rewrite most of the vector classes as a *very* light

[sage-support] Re: Sparse Linear Algebra?

2007-04-19 Thread William Stein
On 4/19/07, Jeff Allotta <[EMAIL PROTECTED]> wrote: > Thanks for the quick response. The dict method should definitely be a > help in general, but I have a couple more questions about this. > > After trying some things, I've noticed that it is possible to coerce a > flat list into a sparse matrix

[sage-support] Re: Sparse Linear Algebra?

2007-04-17 Thread William Stein
Hi Jeff, You should make a sparse matrix by giving a dictionary of (i,j):x entries. Use a list to define a dense matrix and a dictionary to define a sparse matrix. (The error message you get below obviously sucks though, and should be fixed.) On 4/17/07, Jeff Allotta <[EMAIL PROTECTED]> wr