[Numpy-discussion] Detect subclass of ndarray
Alan G Isaac
aisaac at american.edu
Sat Mar 24 13:31:56 EDT 2007
On Sat, 24 Mar 2007, Charles R Harris apparently wrote:
> I think it is reasonable to raise an exception in this
> case, but that is not how numpy currently works, so it is
> a larger policy decision that I can't make on my own. For
> the case under consideration it is possible to define 1-D
> to 2-D rules that are consistent and work, so I am
> thinking of adding those to the __mul__ operator of the
> matrix class. However, as you say, such rules are more
> likely to let some errors slip by. In essence, it is
> rather like type conversion in mixed expressions:
> convenient, but open to error.
Your proposed change is also not how numpy currently works.
If any change is introduced, I hope it will be to raise an
exception.
Thanks!
Alan
More information about the NumPy-Discussion
mailing list