Dec. 16, 2011
3:16 p.m.
Le vendredi 16 décembre 2011 à 15:33 +0100, Gregor Thalhammer a écrit :
Even better: the addendum! http://blog.enthought.com/python/numpy/simplified-creation-of-numpy-arrays-f...
Within cython: cimport numpy numpy.set_array_base(my_ndarray, PyCObject_FromVoidPtr(pointer_to_Cobj, some_destructor))
Seems OK. Any objections about that ?
This is ok, but CObject is deprecated as of Python 3.1, so it's not portable to Python 3.2.
My guess is then that the PyCapsule object is the way to go... -- Fabrice Silva