Hi all, I've posted about this in the user list but after thinking about it a bit more and doing some testing, I tend to believe it's a bug.
In the following code, the cython.double[:] in @cython.locals is not recognized as a type, while g() compiles fine: import cython import scipy @cython.locals(x=cython.double[:]) def f(): x = scipy.array([1,2,3], scipy.double) def g(): cdef double[:] x = scipy.array([1,2,3], scipy.double) Now, one could said memoryviews aren't supported in pure python mode (which would be a pity) but then, in the interpreter: In [48]: cy.int[:] Out[48]: int[:] In [49]: type(cy.int[:]) Out[49]: Cython.Shadow._ArrayType Shadow.py implements the machinery for the interpreter, but the compiler is not consistently supporting it. Best regards -- Carlos PS: do you know of any workaround? _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel