[SciPy-user] sparse+slice? (and hello!)
Bram de Jong - MTG
bdejong at iua.upf.edu
Wed May 17 05:43:17 EDT 2006
Hi,
Ed Schofield wrote:
> On 17/05/2006, at 9:19 AM, Bram de Jong - MTG wrote:
>>
>> * A simple question to start of with, is it correct to say that the
>> sparse matrices do not support slicing?
>
> I've added some support for slicing in more recent SVN versions.
> It's now possible to use csc[:, j], csr[i, :], or lil[i, :]. These
> should be efficient operations. But slicing along the 'non-native'
> axes, with csc[i, :], csr[:, j], or lil[:, j] would be slower (and
> more complex to write), and these raise an IndexError.
Oh, that's great news... Is this Python-only, or C code? Just to know if
I will have to recompile. (Are there daily builds somewhere?)
Perhaps slicing along the non-native axes could be supported as well,
even if it's really slow... A simple docstring with a message about the
speed would solve the problem, while supplying the user with a "full
set". For small matrices or really sparse ones it won't be much of a
problem I guess (?).
>> * a not-so-simple question: is there any documentation, tutorial,
>> introduction, ... to the sparse matrices of scipy? It seems neither
>> the
>> official (feebased) docs mention them, nor are the docstrings *that*
>> extensive.
>
> There are also more docstrings in SVN HEAD. No tutorial yet,
> although we've had several requests recently. I'll see what I can do
> after I've submitted my thesis in a few weeks ...
Ok, that's great as well...
thanks for the rapid reply!
- bram
--
MTG - http://www.mtg.upf.edu/
The Freesound Project - http://freesound.iua.upf.edu
Smartelectronix - http://www.smartelectronix.com
Musicdsp - http://www.musicdsp.org
Office Telephone - +34 935 422 101
More information about the SciPy-User
mailing list