NumPy arrays that use memory allocated from other libraries or tools

Travis Oliphant oliphant.travis at ieee.org
Wed Sep 10 06:39:26 CEST 2008


I wanted to point anybody interested to a blog post that describes a 
useful pattern for having a NumPy array that points to the memory 
created by a different memory manager than the standard one used by 
NumPy.   The pattern  shows how to create a NumPy array that points to 
previously allocated memory and then shows how to construct an object 
that allows the correct deallocator to be called when the NumPy array is 
freed.

This may be useful if you are wrapping code that has it's own memory 
management scheme.   Comments and feedback is welcome.

The post is

http://blog.enthought.com/?p=62


Best regards,

-Travis Oliphant




More information about the Python-list mailing list