Python Zone is brought to you in partnership with:

Chris has been married to the love of his life, Danielle, for over four years now and they recently had their first child, their daughter Helena. Chris was an expert wrangler of developer content for DZone, then spent some time in the marketing department for DZone and AnswerHub, where he taught himself to code html. Now he handles production duties for DZone, so he's responsible for all those emails you get from DZone! BTW, if you're looking for someone to bore you to death with endless football knowledge, Chris is your go-to-guy! Chris is a DZone employee and has posted 315 posts at DZone. You can read more from them at their website. View Full User Profile

Recent Updates for NumPy on PyPy

04.18.2012
| 2857 views |
  • submit to reddit
A lot has happened in the last month or so, like PyCon 2012, so the PyPy Status Blog was a little behind in their update release. However, yesterday they released a list of some important updates and improvements for NumPy.  Let's take a look:

  • Matti Picus made out parameter work for a lot of (but not all) functions.
  • We merged record dtypes support. The only missing dtypes left are complex (important), datetime (less important) and object (which will probably never be implemented because it makes very little sense and is a mess with moving GCs).
  • Taavi Burns and others implemented lots of details, including lots of ufuncs. On the completely unscientific measure of "implemented functions" on numpypy status page, we're close to 50% of numpy working. In reality it might be more or less, but after complex dtypes we're getting very close to running real programs.
  • Bool indexing of arrays of the same size should work, leaving only arrays-of-ints indexing as the last missing element of fancy indexing.
  • I did some very early experiments on SSE. This work is seriously preliminary - in fact the only implemented operation is addition of float single-dimension numpy arrays. However, results are encouraging, given that our assembler generator is far from ideal:



    The benchmark repo is available. GCC was run with -O3, no further options specified. PyPy was run with default options, the SSE branch is under backend-vector-ops, but it's not working completely yet.

    One might argue that C and Python is not the same code - indeed it is not. It just shows some possible approach to writing numeric code.

- Maciej Fijalkowsk


What stood out to me was the experiments on SSE, and while it may be very early in the testing process, the possiblity of having a solid approach to wriitng numeric code is pretty exciting.  And as if this list wasn't enough, there's also a short list of features just waiting to be implemented, including:

  • specialised arrays i.e. masked arrays and matrixes
  • core modules such as fft, linalg, random.
  • numpy's testing framework

Maciej Fijalkowsk


So keep yourself tuned in to NumPy and the future updates that come.  There are a lot of things in the work, and as Maciej put it, "the future is hard to predict, but we're not far off!"