[Numpy-discussion] Should ndarray be a context manager?
njs at pobox.com
Wed Dec 10 18:34:49 EST 2014
On Wed, Dec 10, 2014 at 9:03 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> On Wed, Dec 10, 2014 at 11:44 AM, Andrea Gavana <andrea.gavana at gmail.com>
>> The argument is not check_refs, but refcheck.
> thanks -- yup, that works.
> Useful -- but dangerous!
> I haven't managed to trigger a segfault yet but it sure looks like I
On Linux at least this should work reliably:
In : a = np.zeros(2 ** 20)
In : b = a[...]
In : a.resize((0,), refcheck=False)
In : b = 1
zsh: segmentation fault ipython
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
More information about the NumPy-Discussion