Ñò
\ÐKc @ s¼ d Z g Z d d k Z e i d ƒ d d k Z d d k Z d d k Z d „ Z d „ Z d „ Z d „ Z
e i i d „ Z
d „ Z e i i d
„ Z e d j o e
e i ƒ n d S( s`
This module converts code written for numpy.numarray to work
with numpy
FIXME: finish this.
iÿÿÿÿNs. numpy.numarray.alter_code2 is not working yet.c C s* t | d ƒ } | i | ƒ | i ƒ d S( Nt w( t filet writet close( t namet filestrt fid( ( s@ /usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt makenewfile s
c C sO t | ƒ } | i ƒ } | i ƒ t i i | ƒ \ } } t | d | ƒ | S( Ns .orig( R t readR t ost patht splitextR ( R R R t baset ext( ( s@ /usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt
getandcopy s
c C s) t | ƒ } t | ƒ } t | | ƒ d S( sŸ Convert the filename given from using Numeric to using NumPy
Copies the file to filename.orig and then over-writes the file
with the updated code
N( R t fromstrR ( t filenameR ( ( s@ /usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt convertfile s c C s | d } t | ƒ d S( Ni ( R ( t argsR ( ( s@ /usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt fromargs) s
c C s= t i t i i | d ƒ ƒ } x | D] } t | ƒ q% Wd S( sò Convert all .py files to use NumPy (from Numeric) in the directory given
For each file, a backup of