[Numpy-discussion] backwards compatibility and deprecation policy NEP

Ralf Gommers ralf.gommers at gmail.com
Sun Jul 22 15:01:20 EDT 2018


On Sat, Jul 21, 2018 at 7:06 PM, Marten van Kerkwijk <
m.h.vankerkwijk at gmail.com> wrote:

> Hi Ralf,
>
> Maybe as a concrete example of something that has been discussed, for
> which your proposed text makes (I think) clear what should or should not be
> done:
>
> Many of us hate that `np.array` (like, sadly, many other numpy parts)
> auto-converts anything not obviously array-like to dtype=object, and it has
> been suggested we should no longer do this by default [1]. Given your NEP,
> I think you would disagree with that path, as it would quite obviously
> break user's code (we also get regular issues about object arrays, which
> show that they are used a lot in the wild). So, instead I guess one might
> go with a route where one could explicitly tell `dtype=object` was not
> wanted (say, `dtype="everything-but-object')?
>

Thanks, good example. "everything-but-object" makes sense to me. I'd indeed
argue that changing the current conversion to object dtype behavior would
break way too much code.

Cheers,
Ralf



> All the best,
>
> Marten
>
> [1] https://github.com/numpy/numpy/issues/5353
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180722/f5fdb7a2/attachment.html>


More information about the NumPy-Discussion mailing list