[SciPy-User] Dot product of a matrix and an array
Fri Feb 17 08:02:19 CST 2012
On Fri, 17 Feb 2012 08:55:01 -0500
Alan G Isaac <email@example.com> wrote:
> On 2/17/2012 6:04 AM, Jaakko Luttinen wrote:
>> The dot product of a matrix and an array seems to return
>> However, this resulting matrix seems to have
>>inconsistent shape. For
>> simplicity, let I be an identity matrix (matrix object)
>>and x a vector
>> (1-d array object). Then np.dot gives wrong dimensions
>>for I*x which
>> causes that one can not compute I*(I*x).
> It is unclear what a consistent shape means in this
> (For me it would be to return a 1d array.)
>For this reason, the suggestion resurfaces from time to
> to raise an error for multiplication between a matrix
>and an array.
> In any case, computations mixing matrices and arrays are
>a "bad idea".
> Alan Isaac
This reminds me of an old ticket
More information about the SciPy-User