[Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

Olivier Delalleau shish at keba.be
Wed May 23 17:04:11 EDT 2012


2012/5/23 Nathaniel Smith <njs at pobox.com>

> On Wed, May 23, 2012 at 6:29 PM, Travis Oliphant <travis at continuum.io>
> wrote:
> > Then are you suggesting that we need to back out the changes to the
> casting
> > rules as well, because this will also cause code to stop working.   This
> is
> > part of my point.   We are not being consistently cautious.
>
> I never understood exactly what changed with the casting rules, but
> yeah, maybe. Still, the question of what our deprecation rules
> *should* be is somewhat separate from the question of what we've
> actually done (or even will do). You have to have ideals before you
> can ask whether you're living up to them :-).
>
> Didn't the casting rules become strictly stricter, i.e. some
> questionable operations that used to succeed now throw an error? If so
> then that's not a *major* violation of my suggested rules, but yeah, I
> guess it'd probably be better if they did warn. I imagine it wouldn't
> be terribly difficult to implement (add a new
> NPY_WARN_UNSAFE_CASTING_INTERNAL value, use it everywhere that used to
> be UNSAFE but now will be SAFE?), but someone who understands better
> what actually changed (Mark?) would have do it.
>

It wasn't just stricter rules. Some operations involving in particular
mixed scalar / array computations resulted in different outputs (with no
warning).

-=- Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120523/227c6be0/attachment.html>


More information about the NumPy-Discussion mailing list