On Thu, Dec 15, 2011 at 04:36:24PM +, Robert Kern wrote:
More explicitly, I have some temporary home-made C structure that holds
a pointer to an array. I prepare (using Cython) an numpy.ndarray using
the PyArray_NewFromDescr function. I can delete my temporary C structure
without
[snip]
Devs, looking into this, I noticed that we use PyDataMem_NEW() and
PyDataMem_FREE() (which is #defined to malloc() and free()) for
handling the data pointer. Why aren't we using the appropriate
PyMem_*() functions (or the PyArray_*() memory functions which default
to using the
Le jeudi 15 décembre 2011 à 18:09 +0100, Gregor Thalhammer a écrit :
There is an excellent blog entry from Travis Oliphant, that describes
how to create a ndarray from existing data without copy:
http://blog.enthought.com/?p=62
The created array does not actually own the data, but its base
Am 16.12.2011 um 11:53 schrieb Fabrice Silva:
Le jeudi 15 décembre 2011 à 18:09 +0100, Gregor Thalhammer a écrit :
There is an excellent blog entry from Travis Oliphant, that describes
how to create a ndarray from existing data without copy:
http://blog.enthought.com/?p=62
The created
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,
On 12/16/2011 04:16 PM, Fabrice Silva wrote:
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
How can one arbitrarily assumes that an ndarray owns its data ?
More explicitly, I have some temporary home-made C structure that holds
a pointer to an array. I prepare (using Cython) an numpy.ndarray using
the PyArray_NewFromDescr function. I can delete my temporary C structure
without freeing
On Thu, Dec 15, 2011 at 16:17, Fabrice Silva si...@lma.cnrs-mrs.fr wrote:
How can one arbitrarily assumes that an ndarray owns its data ?
More explicitly, I have some temporary home-made C structure that holds
a pointer to an array. I prepare (using Cython) an numpy.ndarray using
the
Am 15.12.2011 um 17:17 schrieb Fabrice Silva:
How can one arbitrarily assumes that an ndarray owns its data ?
More explicitly, I have some temporary home-made C structure that holds
a pointer to an array. I prepare (using Cython) an numpy.ndarray using
the PyArray_NewFromDescr function. I
Guillaume Desjardins wrote:
I'm pretty new to Python and numpy (longtime c / matlab programmer),
but after a read through some of the past threads and Travis' Guide
to Numpy, I think I have a fairly good understanding of how the
reshape() function / methods work, with regards to views and
10 matches
Mail list logo