[Numpy-discussion] Backward compatibility plans

Travis Oliphant oliphant.travis at ieee.org
Fri Aug 4 14:07:21 CDT 2006

For backward-compatibility with Numeric and Numarray I'm leaning to the 
following plan:

* Do not create compatibility array objects.  I initially thought we 
could sub-class in order to
create objects that had the expected attributes and methods of Numeric 
arrays or Numarray arrays.  After some experimentation, I'm ditching 
this plan.  I think this would create too many array-like objects 
floating around and make unification even harder as these objects 
interact in difficult-to-predict ways.

Instead, I'm planning to:

1) Create compatibility functions in oldnumeric and numarray 
sub-packages that create NumPy arrays but do it with the same function 
syntax as the old packages.

2) Create 4 scripts for assisting in conversion (2 for Numeric and 2 for 

   a) An initial script that just alters imports (to the compatibility 
       and fixes method and attribute access. 
   b) A secondary script that alters the imports from the compatibility 
       and fixes as much as possible the things that need to change in 
order to
       make the switch away from the compatibility layer to work correctly.

While it is not foolproof, I think this will cover most of the issues 
and make conversion relatively easy.  This will also let us develop 
NumPy without undue concern for compatibility with older packages.

This must all be in place before 1.0 release candidate 1 comes out.

Comments and criticisms welcome.



More information about the Numpy-discussion mailing list