[Numpy-discussion] Allow == and != to raise errors

Frédéric Bastien nouiz at nouiz.org
Tue Jul 23 11:10:51 EDT 2013


I'm mixed, because I see the good value, but I'm not able to guess the
consequence of the interface change.

So doing your FutureWarning would allow to gatter some data about this, and
if it seam to cause too much problem, we could cancel the change.

Also, in the case there is a few software that depend on the old behaviour,
this will cause a crash(Except if they have a catch all Exception case),
not bad result.

I think it is always hard to predict the consequence of interface change in
NumPy. To help measure it, we could make/as people to contribute to a
collection of software that use NumPy with a good tests suites. We could
test interface change on them by running there tests suites to try to have
a guess of the impact of those change. What do you think of that? I think
it was already discussed on the mailing list, but not acted upon.

Fred


On Tue, Jul 23, 2013 at 10:29 AM, Sebastian Berg <sebastian at sipsolutions.net
> wrote:

> On Sat, 2013-07-13 at 11:28 -0400, josef.pktd at gmail.com wrote:
> > On Sat, Jul 13, 2013 at 9:14 AM, Nathaniel Smith <njs at pobox.com> wrote:
> <snip>
> >
> > I'm now +1 on the exception that Sebastian proposed.
> >
> > I like consistency, and having a more straightforward mental model of
> > the numpy behavior for elementwise operations, that don't pretend
> > sometimes to be "python" (when I'm doing array math), like this
> >
>
> I am not sure what the result of this discussion is. As far as I see
> Benjamin and Frédéric were opposing and overall it seemed pretty mixed,
> so unless you two changed your mind or say that it was just a small
> personal preference I would drop it for now.
> I obviously think the current behaviour is inconsistent to buggy and am
> really only afraid of possibly breaking code out there. Which is why I
> think I maybe should first add a FutureWarning if we decide on changing
> it.
>
> Regards,
>
> Sebastian
>
> > >>> [1,2,3] < [1,2]
> > False
> > >>> [1,2,3] > [1,2]
> > True
> >
> > Josef
> >
> >
> > >
> > > -n
> > > _______________________________________________
> > > NumPy-Discussion mailing list
> > > NumPy-Discussion at scipy.org
> > > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at scipy.org
> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130723/facb5659/attachment.html>


More information about the NumPy-Discussion mailing list