Albert Strasheim wrote:
> Hello all
>
> Various people wrote:
>
>>> Im curious though: the several projects recently using ctypes
>>> and numpy to wrap libraries (Pygame SDL, OpenGL, svm) must have come
>>> across the issue of using a creating a numpy array from a ctypes
>>> pointer. Ill have
Hello all
Various people wrote:
> > Im curious though: the several projects recently using ctypes
> > and numpy to wrap libraries (Pygame SDL, OpenGL, svm) must have come
> > across the issue of using a creating a numpy array from a ctypes
> > pointer. Ill have to look further.
> >
> It depends
Mark Heslep wrote:
> Travis Oliphant wrote:
>
>> The problem here is that from Python NumPy has no way to create an
>> ndarray from a pointer. Doing this creates a situtation where it is
>> unclear who owns the memory. It is probably best to wrap the pointer
>> into some kind of object exp
Travis Oliphant wrote:
> The problem here is that from Python NumPy has no way to create an
> ndarray from a pointer. Doing this creates a situtation where it is
> unclear who owns the memory. It is probably best to wrap the pointer
> into some kind of object exposing the buffer protocol and
Mark Heslep wrote:
> Travis Oliphant wrote:
>
>> Mark Heslep wrote:
>>
>>> I don't see a clean way to create a numpy array from a ctypes pointer
>>> object. Is the __array_interface_ in ctypes the thing thats missing
>>> needed to make this happen? I've followed Albert's Scipy cookbook
Mark Heslep wrote:
> I don't see a clean way to create a numpy array from a ctypes pointer object.
> Is the __array_interface_ in ctypes the thing thats missing needed to make
> this happen? I've followed Albert's Scipy cookbook on ctypes here
>
> http://www.scipy.org/Cookbook/Ctypes <-- getti
Mark Heslep schrieb:
> Travis Oliphant wrote:
>> Mark Heslep wrote:
>>> I don't see a clean way to create a numpy array from a ctypes pointer
>>> object. Is the __array_interface_ in ctypes the thing thats missing
>>> needed to make this happen? I've followed Albert's Scipy cookbook
>>> on cty
Travis Oliphant wrote:
> Mark Heslep wrote:
>> I don't see a clean way to create a numpy array from a ctypes pointer
>> object. Is the __array_interface_ in ctypes the thing thats missing
>> needed to make this happen? I've followed Albert's Scipy cookbook
>> on ctypes here
>>
>> On the C side
Mark Heslep wrote:
> I don't see a clean way to create a numpy array from a ctypes pointer object.
> Is the __array_interface_ in ctypes the thing thats missing needed to make
> this happen? I've followed Albert's Scipy cookbook on ctypes here
>
> On the C side the PyArray_SimpleNewFromData( ..
I don't see a clean way to create a numpy array from a ctypes pointer object.
Is the __array_interface_ in ctypes the thing thats missing needed to make this
happen? I've followed Albert's Scipy cookbook on ctypes here
http://www.scipy.org/Cookbook/Ctypes <-- getting dated now for numpy SVN b
10 matches
Mail list logo