
Hi, I've been trying to install aubio .. + it looks like it gets stuck because of numpy, and possibly python c bindings .. any idea whats going on ? S++

Hi. Thanks for trying out PyPy. It appears you did not install pypy's version of numpy into the pypy you are using. Directions for that are here http://pypy.org/download.html#installing-numpy. Note however that the package you are trying to install will not compile, and even if it did it would be quite slow, as stated in our FAQ here http://pypy.readthedocs.org/en/latest/faq.html#do-cpython-extension-modules-... which perhaps should be rewritten as "just use cffi instead". For what it is worth, once numpy is installed to pypy, building aubio gives me this error: fatal error: numpy/ufuncobject.h: No such file or directory which may improve (but will never be as fast as cffi) in a future release of pypy as we are working on a ufuncapi branch. Contributions to speed this work along are welcome. Matti It is not clear from your report On 15/11/14 01:15, Stuart Axon wrote:

On Sat, Nov 15, 2014 at 20:04:37 +0200, Matti Picus wrote:
What can be done to help? What I know about ufuncs comes from reading numpy's internals.code-explanations.rst and ufuncs.rst yesterday. On irc you've mentioned that the next step is to set up iterators to deal with ufunc signatures, like (m,n)->(m,m),(m),(m,n) . What are the correct references to make more sense of that? Wouter

On 17/11/14 19:31, Wouter van Heijst wrote: thoughts anyway. The work-in-progress, for what it is worth, is in ufunc.py on the ufuncapi branch, in the over-long call() method of W_UfuncGeneric I am using test_frompyfunc_2d_sig() in test_ufunc which should pass once it all works. My plan is to complete pypy's extensions of frompyfunc() [0] so that it looks more like the capi cpython numpy function PyUFunc_FromFuncAndDataAndSignature(). Then modules like linalg or aubio can be written in python, where they need to call external ufunc functions that iterate over numpy ndarrays, they can easily call them via cffi. It should also support some of numpy's ufunc capi via cpyext, which will always be slow and poorly maintained. The basic machinery to handle signatures parsing and iterating has been "implemented", but I'm not very happy with it. I simply translated _parse_signature() from c to python, without really trying to pythonize the resulting structures. Then when I came to use the parsed results, I discovered that the mechanism I wanted to use, W_NDIter, is not really useful in rpython's interpreter space (as opposed to python application space), so I just left the whole mess to ferment. Now I think it has sat long enough that I can plow it into the ground and use it as compost (my way of saying throw it out and redo) Help in the form of suggestions, criticism, or code are all welcomed, as well as continual encouragement to just finish it. Matti [0] adding cpython-numpy incompatible keywords dtypes, signature, identity, and stack_inputs as documented in the docstring of the frompyfunc function on the ufuncapi branch

Hi. Thanks for trying out PyPy. It appears you did not install pypy's version of numpy into the pypy you are using. Directions for that are here http://pypy.org/download.html#installing-numpy. Note however that the package you are trying to install will not compile, and even if it did it would be quite slow, as stated in our FAQ here http://pypy.readthedocs.org/en/latest/faq.html#do-cpython-extension-modules-... which perhaps should be rewritten as "just use cffi instead". For what it is worth, once numpy is installed to pypy, building aubio gives me this error: fatal error: numpy/ufuncobject.h: No such file or directory which may improve (but will never be as fast as cffi) in a future release of pypy as we are working on a ufuncapi branch. Contributions to speed this work along are welcome. Matti It is not clear from your report On 15/11/14 01:15, Stuart Axon wrote:

On Sat, Nov 15, 2014 at 20:04:37 +0200, Matti Picus wrote:
What can be done to help? What I know about ufuncs comes from reading numpy's internals.code-explanations.rst and ufuncs.rst yesterday. On irc you've mentioned that the next step is to set up iterators to deal with ufunc signatures, like (m,n)->(m,m),(m),(m,n) . What are the correct references to make more sense of that? Wouter

On 17/11/14 19:31, Wouter van Heijst wrote: thoughts anyway. The work-in-progress, for what it is worth, is in ufunc.py on the ufuncapi branch, in the over-long call() method of W_UfuncGeneric I am using test_frompyfunc_2d_sig() in test_ufunc which should pass once it all works. My plan is to complete pypy's extensions of frompyfunc() [0] so that it looks more like the capi cpython numpy function PyUFunc_FromFuncAndDataAndSignature(). Then modules like linalg or aubio can be written in python, where they need to call external ufunc functions that iterate over numpy ndarrays, they can easily call them via cffi. It should also support some of numpy's ufunc capi via cpyext, which will always be slow and poorly maintained. The basic machinery to handle signatures parsing and iterating has been "implemented", but I'm not very happy with it. I simply translated _parse_signature() from c to python, without really trying to pythonize the resulting structures. Then when I came to use the parsed results, I discovered that the mechanism I wanted to use, W_NDIter, is not really useful in rpython's interpreter space (as opposed to python application space), so I just left the whole mess to ferment. Now I think it has sat long enough that I can plow it into the ground and use it as compost (my way of saying throw it out and redo) Help in the form of suggestions, criticism, or code are all welcomed, as well as continual encouragement to just finish it. Matti [0] adding cpython-numpy incompatible keywords dtypes, signature, identity, and stack_inputs as documented in the docstring of the frompyfunc function on the ufuncapi branch
participants (3)
-
Matti Picus
-
Stuart Axon
-
Wouter van Heijst