[Numpy-discussion] PyArray_SETITEM with object arrays in Cython

Dag Sverre Seljebotn dagss@student.matnat.uio...
Thu Feb 12 03:39:56 CST 2009


Wes McKinney wrote:
>
> The general problem here is an indexed array (by dates or strings, for 
> example), that you want to conform to a new index. The arrays most of 
> the time contain floats but occasionally PyObjects. For some reason 
> the access and assignment is slow (this function can be faster by a 
> factor of 50 with C API macros, so clearly something is awry)-- let me 
> know if you see anything obviously wrong with this
Thanks for the example; I don't have time this week but I recorded it on 
the Cython trac and will hopefully get back to it soon.

http://trac.cython.org/cython_trac/ticket/209

Dag Sverre


More information about the Numpy-discussion mailing list