[Numpy-discussion] Detect subclass of ndarray
Colin J. Williams
cjw at sympatico.ca
Sun Mar 25 08:48:30 EDT 2007
Alan G Isaac wrote:
> On Sat, 24 Mar 2007, Charles R Harris apparently wrote:
>> Yes, that is what I am thinking. Given that there are only the two
>> possibilities, row or column, choose the only one that is compatible with
>> the multiplying matrix. The result will not always be a column vector, for
>> instance, mat([[1]])*ones(3) will be a 1x3 row vector.
>
>
>
> Ack! The simple rule `post multiply means its a column vector`
> would be horrible enough: A*ones(n)*B becomes utterly obscure.
> Now even that simple rule is to be violated??
It depends whether ones delivers an instance of the Matrix/vector class
or a simple array.
I assume that, in the above A and B represent matrices.
Colin W.
>
> Down this path lies madness.
> Please, just raise an exception.
>
> Cheers,
> Alan Isaac
More information about the NumPy-Discussion
mailing list