Some numpy funcs for PyPy

hi all, maybe you're aware of numpypy - numpy port for pypy (pypy.org) - Python language implementation with dynamic compilation. Unfortunately, numpypy developmnent is very slow due to strict quality standards and some other issues, so for my purposes I have provided some missing numpypy funcs, in particular * atleast_1d, atleast_2d, hstack, vstack, cumsum, isscalar, asscalar, asfarray, flatnonzero, tile, zeros_like, ones_like, empty_like, where, searchsorted * with "axis" parameter: nan(arg)min, nan(arg)max, all, any and have got some OpenOpt / FuncDesigner functionality working faster than in CPython. File with this functions you can get here Also you may be interested in some info at http://openopt.org/PyPy Regards, Dmitrey.

That's very usefull! I hope these features get included upstream in the next release of numpypy. thanks, Flávio On Thu, May 24, 2012 at 8:32 AM, Dmitrey <tmp50@ukr.net> wrote:
hi all, maybe you're aware of numpypy - numpy port for pypy (pypy.org) - Python language implementation with dynamic compilation.
Unfortunately, numpypy developmnent is very slow due to strict quality standards and some other issues, so for my purposes I have provided some missing numpypy funcs, in particular
- atleast_1d, atleast_2d, hstack, vstack, cumsum, isscalar, asscalar, asfarray, flatnonzero, tile, zeros_like, ones_like, empty_like, where, searchsorted - with "axis" parameter: nan(arg)min, nan(arg)max, all, any
and have got some OpenOpt / FuncDesigner functionality working faster than in CPython.
File with this functions you can get here<http://trac.openopt.org/openopt/browser/numpy.py>
Also you may be interested in some info at http://openopt.org/PyPy Regards, Dmitrey.
_______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
-- Flávio Codeço Coelho ================ +55(21) 3799-5567 Professor Escola de Matemática Aplicada Fundação Getúlio Vargas Rio de Janeiro - RJ Brasil

On Thu, May 24, 2012 at 12:32 PM, Dmitrey <tmp50@ukr.net> wrote:
hi all, maybe you're aware of numpypy - numpy port for pypy (pypy.org) - Python language implementation with dynamic compilation.
Unfortunately, numpypy developmnent is very slow due to strict quality standards and some other issues, so for my purposes I have provided some missing numpypy funcs, in particular
atleast_1d, atleast_2d, hstack, vstack, cumsum, isscalar, asscalar, asfarray, flatnonzero, tile, zeros_like, ones_like, empty_like, where, searchsorted with "axis" parameter: nan(arg)min, nan(arg)max, all, any
and have got some OpenOpt / FuncDesigner functionality working faster than in CPython.
File with this functions you can get here
Also you may be interested in some info at http://openopt.org/PyPy Regards, Dmitrey.
As a NumPy user interested in PyPy it is great to know more people are trying to contribute in this area. I myself have only filed PyPy bugs about missing NumPy features rendering the initial numpypy support useless to me. On your website you wrote:
From my (Dmitrey) point of view numpypy development is very unfriendly for newcomers - PyPy developers say "provide code, preferably in interpreter level instead of AppLevel, provide whole test coverage for all possible corner cases, provide hg diff for code, and then, maybe, it will be committed". Probably this is the reason why so insufficient number of developers work on numpypy.
I assume that is paraphrased with a little hyperbole, but it isn't so different from numpy (other than using git), or many other open source projects. Unit tests are important, and taking patches without them is risky. I've been subscribed to the pypy-dev list for a while, but I don't recall seeing you posting there. Have you tried to submit any of your work to PyPy yet? Perhaps you should have sent this message to pypy-dev instead? (I am trying to be constructive, not critical.) Regards, Peter

On your website you wrote:
From my (Dmitrey) point of view numpypy development is very unfriendly for newcomers - PyPy developers say "provide code, preferably in interpreter level instead of AppLevel, provide whole test coverage for all possible corner cases, provide hg diff for code, and then, maybe, it will be committed". Probably this is the reason why so insufficient number of developers work on numpypy.
I assume that is paraphrased with a little hyperbole, but it isn't so different from numpy (other than using git), or many other open source projects.
Of course, many opensource projects do like that, but in the case of numpypy IMHO the things are especially bad.
Unit tests are important, and taking patches without them is risky.
Yes, but at first, things required from numpypy newcomers are TOO complicated - and no guarrantee is provided, that elapsed efforts will not be just a waste of time; at 2nd, the high-quality standards are especially cynic when compared with their own code quality, e.g. numpypy.all(True) doesn't work yet, despite it hangs in bug tracker for a long time; a[a<0] = b[b<0] works incorrectly etc. These are reasons that forced me to write some required for my purposes missing funcs and some bug walkarounds (like for that one with numpypy.all and any).
I've been subscribed to the pypy-dev list for a while,
I had been subsribed IIRC for a couple of months
but I don't recall seeing you posting there.
I had made some, see my pypy activity here
Have you tried to submit any of your work to PyPy yet?
yes: I had spent lots of time for concatenate() (pypy developers said noone works on it) - and finally they have committed code for this func from other trunc. Things like this were with some other my proposed code for PyPy and all those days spent for it.
Perhaps you should have sent this message to pypy-dev instead?
I had explained them my point of view in mail list and irc channel, their answer was like "don't borther horses, why do you in a hurry? All will be done during several months", but I see it (porting whole numpy) definitely won't be done during the term. IIRC during ~ 2 months only ~10 new items were added to numpypy; also, lots of numpypy items, when calling, e.g. searchsorted, just raise NotImplementedError: wainting for interplevel routine, or don't work with high-dimensional arrays and/or some other corner cases. numpypy developers go (rather slowly) their own way, while I just propose temporary alternative, till proper PyPy-numpy implementation regards, D.

On Thu, May 24, 2012 at 2:07 PM, Dmitrey <tmp50@ukr.net> wrote:
I had been subsribed IIRC for a couple of months
I don't follow the PyPy IRC so that would explain it. I don't know how much they use that rather than their mailing list, but both seem a better place to discuss their handling or external contributions than on the numpy-discussion and scipy-user lists. Still, I hope you are able to make some contributions to numpypy, because so far I've also found PyPy's numpy implementation too limited for my usage. Regards, Peter
participants (3)
-
Dmitrey
-
Flavio Coelho
-
Peter