On Wed, Dec 10, 2014 at 9:03 PM, Chris Barker <chris.bar...@noaa.gov> wrote:
> On Wed, Dec 10, 2014 at 11:44 AM, Andrea Gavana <andrea.gav...@gmail.com>
> wrote:
>>
>> 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
> could...

On Linux at least this should work reliably:

In [1]: a = np.zeros(2 ** 20)

In [2]: b = a[...]

In [3]: a.resize((0,), refcheck=False)

In [4]: b[1000] = 1
zsh: segmentation fault  ipython

-n

-- 
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
http://vorpus.org
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to