Over a million developers have joined DZone.

Recent Updates for NumPy on PyPy

DZone 's Guide to

Recent Updates for NumPy on PyPy

· Web Dev Zone ·
Free Resource
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.


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

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!"

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}