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
> > withou
[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
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
>>
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_
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 cr
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 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
On Thu, Dec 15, 2011 at 16:17, Fabrice Silva 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 PyArray_NewFromDescr func
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 th
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
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 copies.
For what its worth (and to
11 matches
Mail list logo