[Numpy-discussion] Dealloat Numy arrays in C

Robert Kern robert.kern@gmail....
Wed Mar 31 16:19:12 CDT 2010


On Wed, Mar 31, 2010 at 15:05, Jeremy Lewi <jlewi@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