[Cython] Robert: numpy.pxd etc.
Robert Bradshaw
robertwb at math.washington.edu
Tue Jul 7 12:29:55 CEST 2009
On Jul 5, 2009, at 7:19 AM, Dag Sverre Seljebotn wrote:
> (Context:
>
> http://trac.cython.org/cython_trac/ticket/339
> http://trac.sagemath.org/sage_trac/ticket/4571
> )
>
> I want to use Sage to demo Cython at SciPy 09, so I'm going to take
> care
> of #339 within a day or so. I'm thinking about doing it against the
> cython repo, so that 0.11.2.1 could be released and it could go into
> Sage right away, what do you think about that? (There's already a
> regression bugfix in there).
Cool. I got 0.11.2 working with Sage, but never got the spkg in.
> A problem with the merge is that in Cython's numpy.pxd many fields are
> kept as Python (e.g. flags), for better API compatability with Python.
>
> This is a fundamental problem (and I'm not sure I like the
> "solution" I
> went for), but at least for now I'll do something like this:
>
> ctypedef extern class numpy.ndarray [object PyArrayObject]:
> ...
> cdef int c_flags "flags"
>
> so that the Python name is the default. It's easier to change Sage
> here
> than to break backwards compatability.
Yes, feel free to fix Sage (and I do see these as fixes). Also, feel
free to ping me with any questions as I've looked at this code recently.
- Robert
More information about the Cython-dev
mailing list