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-from-pre-allocated-memory/ > > > > 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 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion