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

Nathaniel Smith njs at pobox.com
Wed May 23 16:13:42 EDT 2012

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.

-- Nathaniel

More information about the NumPy-Discussion mailing list