[Cython] [Bug] Memoryviews in pure python mode

2015-04-05 Thread Carlos Pita
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.loc

Re: [Cython] [Bug] Memoryviews in pure python mode

2015-04-05 Thread Carlos Pita
The problem seems to be that SliceIndexNode.analyse_as_type returns just None, thus visit_FuncDefNode throws an error in the cython.locals analysis part. Since a slice can be viewed as a type in the context of cython.locals and cython.declare, analyse_as_type shouldn't return None. This is my firs

[Cython] [Bug] Coercion of struct constructor nodes

2015-04-05 Thread Carlos Pita
Hi all, f and g below should behave identically, shouldn't them? import cython cdef struct Point: int x int y def f(): return Point(x=10, y=10) def g(): cdef Point p = Point(x=10, y=10) return p But then f won't compile: Cannot interpret dict as type 'Python object' Di