On Wed, Mar 13, 2013 at 7:20 PM, Neal Becker
Robert Kern wrote:
On Wed, Mar 13, 2013 at 6:40 PM, Neal Becker
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 =
PyArray_DATA(array) itera = <flatiter>PyArray_IterNew(<object>oa) for i from 0 <= i < length: array_data[i] = func(state, ( (itera.dataptr))[0]) ^ ------------------------------------------------------------ mtrand.pyx:177:41: Python objects cannot be cast to pointers of primitive types
It looks like Cython 0.18 removed the members of flatiter in its copy
of numpy.pxd in favor of the macros that are recommended for numpy
1.7. The irony is not lost on me.
This should be (