Leonardo Santagada, 18.10.2011 19:23:
pypy numpy does support dtype IIUC so in the end it will have
all the features of numpy described in the article, it is going to be
one interface to all the libraries to talk to, but it  is not going to
be the same as cpython numpy. I don't think it is impossible to have
an easy path for people to support both cpython numpy and pypy numpy
on the same lib (either using cython or a simple C API). Maybe a easy
to do is to make something like cpyext just for numpy api, and then
latter agree on a common api for both, or to make cython to generate
the correct one for each interpreter.

Basically, all that Cython does (at least for recent versions of NumPy), is to generate C level access code through the PEP 3118 buffer API. I don't know if that (or something like it) is available in PyPy. Even if not, it may not be hard to emulate at a ctypes-like level (it requires C data types for correct access to the array fields).

Stefan

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to