[Numpy-discussion] FWIW: "regressions" of dependees of nukmpy 1.7.0b1
Nathaniel Smith
njs@pobox....
Wed Sep 5 16:41:48 CDT 2012
On Wed, Sep 5, 2012 at 10:02 PM, Yaroslav Halchenko
<lists@onerussian.com> wrote:
> quick question -- either this is a desired effect that ndarray.base is no
> longer chains to point to all parent arrays? following code produces
> different outputs with 1.6.3 and 1.7.0b1:
>
> $> python -c 'import numpy as np; print np.__version__; a=np.arange(10); print a[:4].base is a, a[:4][:3].base is a, a[:4][:3].base.base is a'
>
> 1.6.2
> True False True
>
> 1.7.0rc1.dev-ea23de8
> True True False
It is an intentional change:
https://github.com/numpy/numpy/commit/b7cc20ad#L5R77
but the benefits aren't necessarily *that* compelling, so it could
certainly be revisited if there are unforeseen downsides. (Mostly it
means that intermediate view objects can be deallocated when not
otherwise referenced.) Is it somehow causing a problem for you? AFAICT
introspection on .base is just a bad idea to start with, but...
-n
More information about the NumPy-Discussion
mailing list