[Numpy-discussion] Uncomfortable with matrix change

Charles R Harris charlesr.harris@gmail....
Fri May 9 09:00:51 CDT 2008


On Fri, May 9, 2008 at 7:43 AM, Travis Oliphant <teoliphant@gmail.com>
wrote:

>
> Hi all,
>
> I'm having trouble emailing this list from work, so I'm using a
> different email address.
>
> After Nathan Bell's recent complaints, I'm a bit more uncomfortable with
> the matrix change to scalar indexing.   It does and will break code in
> possibly hard-to-track down ways.   Also, Nathan has been a *huge*
> contributor to the Sparse matrix in scipy and so I value his opinion
> about the NumPy matrix.  One of my goals is to have those two objects
> work together a bit more seamlessly.
>
> So, I think we need to:
>
> 1) Add a warning to scalar access
> 2) Back-out the change and fix all the places where NumPy assumes
> incorrectly that the number of dimensions reduce on PySequence_GetItem.
>

-1.

That said, the basic mistake is probably making Matrix a subclass of
ndarray, as it fails the "is a" test. There really aren't that many places
where inheritance is the right choice and  numpy itself wasn't designed as a
base class: it lacks a specification of what functions can be "virtual" and
is probably too big.

I vote that we bring Nathan into the conversation and see how upset he
really is. Speaking for myself, I sometimes get angry upfront when
specifications change unexpectedly underfoot but then settle down and find
that it isn't all that bad. Being caught by surprise is probably half the
problem.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080509/f458bc25/attachment.html 


More information about the Numpy-discussion mailing list