[Numpy-discussion] Need help for the migration from Numeric to numpy

Frank Thommen structures-it at embl-heidelberg.de
Thu Oct 14 10:03:32 EDT 2010


Bruce Southey wrote:
>   On 10/14/2010 02:20 AM, Frank Thommen wrote:
>> Hi,
>>
>> I'm trying to help a user to migrate from Numeric to numpy.  I found 
>> reference to alter_code1.py on 
>> http://numpy.scipy.org/old_array_packages.html.
>>
>>
>> [...]

> Are you converting from Numeric or numarray?

from Numeric.


> These are slightly different versions of 'alter_code1.py '.
> Anyhow I would not use it because these are likely to be very out of 
> date (over 2 years ago).

That's what I imagined ;-)


> There used to be documentation on this but I do not see it anymore. This 
> is an useful one for numarray:
> http://www.stsci.edu/resources/software_hardware/numarray/numarray2numpy.pdf

I assume, that this will not helo much when converting from Numeric? 
(sorry, I don't use Python myself).  Thanks anyway.


> A lot depends on the size of code and complexity of code - it will 
> difficult to address the API changes. Essentially I just rewrote my code 
> changing numarray functions to numpy functions (I really only used 
> numarray). Sure my code was small and not complex but it also helped 
> improve the code. From what I recall, the only things I was doing was 
> changing the array declarations - especially dtypes. After those, you 
> have to watch for function changes and new features. 

I cannot assess the complexity of the code regarding Numeric/numpy, as I 
don't use Python myself.  I will forward these informations to the user 
in question and hopefully he can manage to convert his files.  I'm 
afraid that will be a lot of files (he is using Numeric since many, many 
years and never updated to newer packages)



> Also I would suggest that you have a Numeric/numarray working with some 
> older version of Python. This enables you to check intermediate results 
> as needed.

We have that.  It's the installation I want to get rid of...:-)

Thanks a lot

      frank



More information about the NumPy-Discussion mailing list