From: Benjamin T. <ben...@de...> - 2006-06-19 11:47:55
|
Le Vendredi 16 Juin 2006 20:01, Matthieu Perrot a =E9crit=A0: > 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++= =20 vector (which are contiguous structures). I actually tried to overload the= =20 getitem() field of my own dtype to build python wrappers at runtime around= =20 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=20 right solution, still. Is there any plans to update the trunk which something similar ? =2D- Benjamin Thyreau decideur.info |