Re: [Cython] Failure with asarray(memoryview) on Python 2.4

2012-06-11 Thread mark florisson
On 11 June 2012 20:55, Pauli Virtanen wrote: > 11.06.2012 21:23, Pauli Virtanen kirjoitti: >> Hi, >> >> 11.06.2012 21:16, mark florisson kirjoitti: >> [clip] >>> Yeah, there was some weird bug with PyIndex_Check() not operating >>> properly. Could you retry with the latest master? >> >> Doesn't se

Re: [Cython] Failure with asarray(memoryview) on Python 2.4

2012-06-11 Thread Pauli Virtanen
11.06.2012 21:23, Pauli Virtanen kirjoitti: > Hi, > > 11.06.2012 21:16, mark florisson kirjoitti: > [clip] >> Yeah, there was some weird bug with PyIndex_Check() not operating >> properly. Could you retry with the latest master? > > Doesn't seem to work in 5a0effd0 :( [clip] Uhh, Numpy header a

Re: [Cython] Failure with asarray(memoryview) on Python 2.4

2012-06-11 Thread Pauli Virtanen
Hi, 11.06.2012 21:16, mark florisson kirjoitti: [clip] > Yeah, there was some weird bug with PyIndex_Check() not operating > properly. Could you retry with the latest master? Doesn't seem to work in 5a0effd0 :( Traceback (most recent call last): File "", line 1, in ? File "fail.pyx", line 1

Re: [Cython] Failure with asarray(memoryview) on Python 2.4

2012-06-11 Thread mark florisson
On 11 June 2012 20:08, Pauli Virtanen wrote: > Hi, > > This doesn't work on Python 2.4 (works on >= 2.5): > > > cimport numpy as np > import numpy as np > > def _foo(): >    cdef double[:] a >    a = np.array([1.0]) >    return np.asarray(a) > > def foo(): >    print _foo() >

[Cython] Failure with asarray(memoryview) on Python 2.4

2012-06-11 Thread Pauli Virtanen
Hi, This doesn't work on Python 2.4 (works on >= 2.5): cimport numpy as np import numpy as np def _foo(): cdef double[:] a a = np.array([1.0]) return np.asarray(a) def foo(): print _foo() Spotted when using Cython 1.6 in Scipy. Results to: Python 2.4.