[SciPy-dev] Sparse feature suggestion: zero-sized sparse matrices

Neilen Marais nmarais@sun.ac...
Mon Feb 11 12:13:05 CST 2008


Hi,

On Mon, 11 Feb 2008 11:09:49 -0600, Nathan Bell wrote:

> On Feb 11, 2008 10:50 AM, Neilen Marais <nmarais@sun.ac.za> wrote:

>> It seems normal numpy arrays support the idea of zero-dimension 2-D
>> arrays. Would anyone object to this feature in sparse matrices? If not,
>> I could try to cook up a patch.
> 
> You're welcome to try, but I think it would be a nightmare to implement.
> 
> I would only object if the necessary changes introduced a large number
> of statements of the form
> 
>   if shape[0] == 0:
>      do strange thing
>   else:
>      do normal thing
> 
> because that sort of thing is difficult to maintain.
> 
> On the other hand, there may be a comprehensive solution that resolves
> such matters in a simple and consistent way.

I'll have a looksee soon. Thanks for the heads-up :)

Regards
Neilen



More information about the Scipy-dev mailing list