[Numpy-discussion] Dealloat Numy arrays in C

Robert Kern robert.kern at gmail.com
Wed Mar 31 17:19:12 EDT 2010


On Wed, Mar 31, 2010 at 15:05, Jeremy Lewi <jlewi at intellisis.com> wrote:

> So my question is what is the best way to ensure I’m using the correct
> memory deallocator for the buffer? i.e the deallocator for what ever
> allocator numpy used to allocate the array?

PyArray_free() (note the capitalization). This is almost always
PyMem_Free() from Python.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list