[pypy-dev] ufuncapi branch

Matti Picus matti.picus at gmail.com
Sun Dec 28 21:48:25 CET 2014


I have been plugging away at getting linalg support working via the 
ufunc capi in cpyext.
It turns out that the branch can actually run much of linalg, and does 
not crash pypy.
The ufunc api is a very convoluted, it uses a function-selection 
mechanism based on dtypes, and function interface specification via 
signatures. I am sure I have not covered all the corners with the tests 
that exist in micronumpy, and the numpy tests seem very minimal as well, 
but it seems to work as advertised.
Currently numpy's linalg uses the cpyext interface, my next step should 
be to use cffi instead via the extended frompyfunc() interface that 
supports most of the ufunc capi arguments, this work will happen in the 
cffi-linalg branch of pypy/numpy.
I would like to merge the ufuncapi branch of pypy to default, that would 
make work on the pypy/numpy repo easier. Are there objections and/or 
does anyone know of a wider suite of tests of ufuncs?

Matti

Note that we now have a solution for getting non-ui matplotlib plots:
- translate the pypy ufuncapi branch
- set it up in a virtualenv
- install the cffi-linalg branch of pypy/numpy
- install github.com/mattip/matplotlib

This is sufficient to run the python-benchmarks repo from 
https://github.com/numfocus/python-benchmarks



More information about the pypy-dev mailing list