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
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
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
> 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
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
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