On Friday, 19 October 2012 20:35:07 UTC+8, jason wrote:
>
> On 10/19/12 7:25 AM, Dima Pasechnik wrote: 
> > While some ARPACK functionality is available in Sage from scipy (more is 
> > implemented in scipy 0.11, than in currently available in Sage scipy 
> > 0.9, but this is taken care of  in #13541, which I'm reviewing 
> presently), 
> > the functionality allowing to implement matrices as callback functions 
> > (sometimes a big win in memory/speed) seems to be missing. 
> > 
> > Any idea how can this be handled? 
> > 
>
> Do you mean a sparse matrix class where A[i,j] actually calls some 
> function that you supply?


right.
 

>  I'd make a subclass of sparse matrices (or 
> maybe even dense matrices??), and just override the unsafe indexing 
> method.  I think all indexing ends up going through that function.


well, it does not look that obvious (it's sparse scipy/numpy matrices: 
http://docs.scipy.org/doc/scipy/reference/sparse.html) and they have 
several member functions, such as __getitem__, _get_row_slice, etc...

Hmm, I actually thought they are way more optimized, than what I saw in 
sage/scipy/sparse/csr.py

Thanks a lot anyway,
Dima 


 

>
>
> Thanks, 
>
> Jason 
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to