[Numpy-discussion] Summer of Code ideas

Tim Hochberg tim.hochberg at cox.net
Wed Apr 19 19:57:06 CDT 2006


Discussing ideas for summer of code projects seems to be all the rage 
right now on various other Python lists, so I though I'd throw out a few 
that I've had. There are several different things that could be done 
with numexpr including:

    1. Adding broadcasting.
    2. Coercing arrays a chunk at a time instead of all at once when 
coercion is necessary.
    3. Fancier syntax. I think that some variant of the following could 
be made to work:
              with deferred_evaluation: # Converts everything in local 
namespace to special objects
                    # all of these math operations are deferred
                    a = 5 + b*32
                    c = a + 73
              # Now all objects are restored and deferred experesions 
are evaluated.
        This might be cool or it might be useless, but it sounds fun to try.

I haven't talked to David Cooke about any of these and since numexpr is 
really his project he should be consulted before anyone tries these.

There's also some stuff to be done on the basearray front. I expect I'll 
have the actual basearray object together in the next couple of weeks 
depending on my level of busyness, but there'll be a lot of other stuff 
to do besides just that.  My general plan it to build a toolkit around 
basearray that can be used to build other array packages. These packages 
might be lighter weight than numpy or they might be specialized in some 
way that's not really compatible with numpy and ndarray.

There's also room for potential for experimentation with protocols / 
generic functions. If anyones interested I suggest you read the thread 
(currently dormant) on python-3000.devel on this topic. There are lots 
of possible applications for this in numpy including using them to 
implement or replace:

   * asarray
   * __array_priority__ (by making the ufuncs and thus __add__, etc 
overloaded functions).
   * __array__, __array_wrap__, etc.
   * all the various functions that are giving us trouble with MA.
   * probably a bunch of other stuff.

The basic basearray toolkit I mentioned above  would be a good place to 
experiment with stuff like this, once it exists,  since in theory it 
will be simpler than the full numpy codebase and you don't have to worry 
so much about backwards compatibility.

Anyway, that's a bunch of random ideas that I at least find interesting.

Regards,

-tim






More information about the Numpy-discussion mailing list