[SciPy-User] "Zero"-shape sparse matrices

Jaakko Luttinen jaakko.luttinen@aalto...
Thu Feb 16 09:44:40 CST 2012


Hi!

To make a long story short, Scipy doesn't seem to allow sparse matrices
that have length zero on any of the axes. For instance:
C = numpy.ones((0,0))
K = scipy.sparse.csc_matrix(C)
ValueError: invalid shape

It is possible to create a "zero"-shape dense matrix but not sparse.
Why? To me, this seems like a bug.. Is it so?

Thanks for any help!
Best regards,
Jaakko


More information about the SciPy-User mailing list