[Numpy-discussion] tiny patch + Playing with strings and my own array descr (PyArray_STRING, PyArray_OBJECT).
Benjamin Thyreau
benjamin at decideur.info
Mon Jun 19 07:46:38 EDT 2006
Le Vendredi 16 Juin 2006 20:01, Matthieu Perrot a écrit :
> hi,
>
> I need to handle strings shaped by a numpy array whose data own to a C
(...)
> a new array descr based on PyArray_OBJECT and change its getitem/setitem
> --
> Matthieu Perrot Tel: +33 1 69 86 78 21
> CEA - SHFJ Fax: +33 1 69 86 77 86
> 4, place du General Leclerc
> 91401 Orsay Cedex France
Hi,
Seems i had the similar problem when i tried to use numpy to map STL's C++
vector (which are contiguous structures). I actually tried to overload the
getitem() field of my own dtype to build python wrappers at runtime around
the allocated C objects array (ie. NOT an array of Python Object).
Actually your suggested modification seems to work for me, i dunno if it's the
right solution, still.
Is there any plans to update the trunk which something similar ?
--
Benjamin Thyreau
decideur.info
More information about the NumPy-Discussion
mailing list