[Fwd: NumPy arrays that use memory allocated from other libraries or tools]

View: New views
1 Messages — Rating Filter:   Alert me  

[Fwd: NumPy arrays that use memory allocated from other libraries or tools]

by John Reid-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I saw this on the rpy list and thought it might be of interest to some here.

John.

-------- Original Message --------
Subject: NumPy arrays that use memory allocated from other libraries or
tools
Date: Tue, 09 Sep 2008 23:39:26 -0500
From: Travis Oliphant <oliphant.travis@...>
To: python-list@...
CC: rpy-list@..., ctypes-users@...
Newsgroups:
gmane.comp.python.general,gmane.comp.python.rpy,gmane.comp.python.ctypes


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

--
http://mail.python.org/mailman/listinfo/python-list

_______________________________________________
C++-sig mailing list
C++-sig@...
http://mail.python.org/mailman/listinfo/c++-sig
LightInTheBox - Buy quality products at wholesale price!