[Numpy-discussion] can't run cython on mtrand.pyx
Neal Becker
ndbecker2 at gmail.com
Wed Mar 13 15:20:30 EDT 2013
Robert Kern wrote:
> On Wed, Mar 13, 2013 at 6:40 PM, Neal Becker <ndbecker2 at gmail.com> wrote:
>> Grabbed numpy-1.7.0 source.
>> Cython is 0.18
>>
>> cython mtrand.pyx produces lots of errors.
>
> It helps to copy-and-paste the errors that you are seeing.
>
> In any case, Cython 0.18 works okay on master's mtrand.pyx sources.
>
Well, this is the first error:
cython mtrand.pyx
Error compiling Cython file:
------------------------------------------------------------
...
PyArray_DIMS(oa) , NPY_DOUBLE)
length = PyArray_SIZE(array)
array_data = <double *>PyArray_DATA(array)
itera = <flatiter>PyArray_IterNew(<object>oa)
for i from 0 <= i < length:
array_data[i] = func(state, (<double *>(itera.dataptr))[0])
^
------------------------------------------------------------
mtrand.pyx:177:41: Python objects cannot be cast to pointers of primitive types
More information about the NumPy-Discussion
mailing list