[Numpy-discussion] Numarray compatibility module available

Travis Oliphant oliphant.travis at ieee.org
Thu Aug 10 14:10:47 CDT 2006


I've just finished a first version of the numarray compatibility 
module.  It does not include all the names from the numarray name-space 
but it does include the most important ones, I believe.  It also 
includes a slightly modified form of the numarray type-objects so that 
NumPy can recognize them as dtypes.   I do not have a lot of code to 
test the compatibility layer with so any help will be appreciated.

The compatibility  layer still requires changes to certain methods and 
attributes on arrays.  This is performed by the alter_code1.py module 
which I will be finishing over the next few hours.  Once that is ready 
(and I've updated NumPy to work with the latest version of Python 2.5 in 
SVN) I want to make a 1.0b2 release (no later than Friday).   I would 
appreciate it if several people could test the current SVN version of NumPy.

In order to support several of the features of NumArray that I had 
missed, I engaged in a marathon coding sprint last night from about 
6:00pm to 6:00am during which time I added output arguments to many of 
the functions in NumPy, and a clipmode argument to several others.   I 
also added the C-API functions PyArray_OutputConverter and 
PyArray_ClipmodeConverter to make it easy to get these arguments from 
Python to C. This caused a change in the C-API that will require 
re-compilation for 1.0b2.  I'm sorry about that.  I'm really pushing for 
stability on the C-API.  Now that the numarray compatibility module is 
complete, I'm more confident that we won't need anymore changes to the 
C-API for version 1.0.   Of course, only when numpy 1.0final comes out 
will that be a guarantee. 

While I'm relatively confident about the changes to NumPy, the changes 
were extensive enough that more testing is warranted including another 
round of Valgrind tests.  Unit-tests written to take advantage of the 
new output arguments on several of the functions (take, put, compress, 
clip, conjugate, argmax, argmin, and any function based on a ufunc 
method -- like sum, product, any, all, etc.) are particularly needed.  
If serious problems are discovered, then the 1.0b2 might be delayed 
again, but I'm really pushing to get 1.0b2 out the door soon.

The numarray compatibility module and the oldnumeric compatibility 
module should hopefully help people adapt their code more quickly to 
NumPy.  It's not fool-proof, though, so the best strategy is still to 
write to NumPy :-) as soon as you can.

-Travis





More information about the Numpy-discussion mailing list