[SciPy-user] dimension mismatch error

David Cournapeau david@ar.media.kyoto-u.ac...
Sun Jan 11 06:26:27 CST 2009


Dinesh B Vadhia wrote:
> I want to do a vector-matrix multiplication as follows:
>  
> z = y * A
>  
> ... where y is a (1 x J) vector, A is a (I x J) Scipy (csr) Sparse
> matrix, and the resulting z a (1 x J) vector.

Is y dimension (1xJ) a type or the actual dimension ? In that later
case, a ValueError is expected for matrix product :)

cheers,

David


More information about the SciPy-user mailing list