[pypy-dev] Some NumPyPy propositions

Maciej Fijalkowski fijall at gmail.com
Tue Jan 17 17:21:57 CET 2012

On Mon, Jan 16, 2012 at 10:47 AM, Dmitrey <dmitrey15 at ukr.net> wrote:
> Hi,
> On 01/14/2012 08:22 PM, Maciej Fijalkowski wrote:
>> Hi Dmitrey.
>> Let me answer your questions one by one.
>> On Thu, Jan 12, 2012 at 11:42 AM, Dmitrey<dmitrey15 at ukr.net>  wrote:
>>> hi all,
>>> I would like to make some propositions wrt NumPy port development:
>>> 1) It would be nice to have a build and/or install parameter to available
>>> usage of numpypy as numpy, e.g. "setup.py build --numpypy_as_numpy". I
>>> know
>>> it can be done via some tricks, but explicit parameter would be better,
>>> especially for unexperienced users.
>> We can trivially have such a package on cheeseshop. It would do: from
>> numpypy import *. You can even create your own package called numpy.py
>> and put it somewhere on PYTHONPATH to achieve the same result.
> As a programmer with essential Python experience I could make it done quite
> easily, but I guess many Python/NumPy teachers/students and other Python
> newbies will found easier to use other Python distributions like EPD, Sage
> or PythonXY, than process on PyPy installation with rasp. Well, it's up to
> you, of course.

The thing is numpy in pypy as of now is not really ready for such
people because it's unfinished. We'll think what to do once it's more
finished, which should not take that long.

>>> 2) Many soft packages have some basic functionality without full numpy
>>> port,
>>> but due to importing issues they cannot yield even it. For example:
>>> from numpy import some_func, a_rare_func_unimplemented_in_pypy_yet
>>> ...
>>> if user_want_this:
>>>    some_func()
>>> elif user_want_some_rare_possibility:
>>>    a_rare_func_unimplemented_in_pypy_yet()
>>> It would be nice to have possibility to install PyPy NumPy port with all
>>> unimplemented yet functions as stubs, e.g.
>>> def flipud(*args,**kw):
>>>    raise numpy_absent_exception('flipud is unimplemented yet')
>>> (and similar stubs for ndarray and matrix methods)
>> This is IMO a very bad idea. It pushes back the problem from import
>> time to some later time, while effectively not fixing it. I would say
>> just "wait a bit" or make your package cooperate with numpypy now, but
>> we expect new functionality to appear relatively rapidly.
> I haven't said to make this default behaviour, I mere proposed to have a
> *possibility* for installation of numpypy that will like this. Than people
> could estimate difference of CPython and PyPy speed on (initially) limited
> set of tests and, being impressed, contribute some code or maybe even
> financial support to your project to accomplish NumPy and probably
> furthermore SciPy port.

I think people who are willing to contribute are probably also willing
to live with the fact that not everything works. I might be wrong of

>>> 3) Last but not least; I'm author and developer of openopt suite
>>> (openopt.org with ~ 200 visitors daily, that is AFAIK about 10% of
>>> scipy.org) and of course both openopt and PyPy will essentially increase
>>> their users when openopt will be capable of running with PyPy; yet I see
>>> some weeks or months till this still remain. I would be glad to make some
>>> contributions toward this, but my current financial situation cannot
>>> allow
>>> me to work for free. If at least basic financial support could be
>>> obtained,
>>> I guess I could port some missing numpy functions / array methods, maybe
>>> furthermore some functions from scipy.optimize or scipy.sparse. My CV and
>>> contacts are here: http://openopt.org/Dmitrey .
>> We indeed have some money, but what we have is relatively little. The
>> numpy work done so far was purely volunteer effort and we generally
>> select people for doing paid job who are already core developers or
>> heavy contributors. However, the money we have all come from some 3rd
>> parties, pypy as a project does not earn any money - there is
>> absolutely nothing that stops you from convincing some other 3rd party
>> to do work on PyPy's numpy.
> I had already mentioned your project and related progress in my
> (openopt.org) site and forum, you could publish a forum post with your
> appeal there (like you've done in a scipy mail list), maybe someone will
> provide some code contributions into your project, a finance support or
> another assistance.
> You promised to describe what is already implemented
> (http://morepypy.blogspot.com/2012/01/numpypy-progress-report-running.html?showComment=1326227580054#c281969238585943039
> ), but it's undone yet. I had proposed you to create an online table, where
> NumPy functions are split into the following categories:
> * already ported
> * under development (preferably with name of the person who works on it)
> * not started yet
> Is it possible to get the data like this? This way other possible
> contributors (maybe including me) could select an appropriate (i.e. they are
> capable of) function for contribution, and other people could estimate the
> progress done.

Yes, we're working on such thing. The temporary location is at
https://bitbucket.org/fijal/hack2/src/default/numready, we'll probably
create a nightly static HTML.

> Also, is it possible to install recent numpypy without reinstallation of
> whole PyPy?


More information about the pypy-dev mailing list