[Cython] buffer bug

mark florisson markflorisson88 at gmail.com
Sun Oct 2 12:38:23 CEST 2011


Hey,

I'm unable to login in trac, but I found a bug in the buffer support:

cimport cython
cimport numpy as np

@cython.boundscheck(False)
@cython.wraparound(False)
cdef void func(np.ndarray[np.float32_t, ndim=2] a) nogil:
    pass

This calls __Pyx_GetBufferAndValidate, which needs the GIL.

When I get the last failing tests fixed (introduced after rebasing on
the latest master) for memoryviews, should be transform the current
buffer support to memoryviews before doing a release? The only
incompatibility I see is that readonly buffers are not supported.
On the other hand it might be a good idea to wait with that, in case
there are any bugs. We don't want to break everyone's existing code.
Opinions?

Mark


More information about the cython-devel mailing list