diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2007-01-08 21:56:54 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2007-01-08 21:56:54 +0000 |
commit | 1bd2d49ef378fb869d015cef32c3e44a4c03a8f0 (patch) | |
tree | 43335baf1da0b6e9de0ad806e721a077e3cbfa45 /numpy/numarray/alter_code1.py | |
parent | 98b6d48b07f4eadfb7d1fc41483debe7e07eecd6 (diff) | |
download | numpy-1bd2d49ef378fb869d015cef32c3e44a4c03a8f0.tar.gz |
Whitespace cleanup.
Diffstat (limited to 'numpy/numarray/alter_code1.py')
-rw-r--r-- | numpy/numarray/alter_code1.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/numarray/alter_code1.py b/numpy/numarray/alter_code1.py index 4a62324fc..ae950e7e0 100644 --- a/numpy/numarray/alter_code1.py +++ b/numpy/numarray/alter_code1.py @@ -50,7 +50,7 @@ Makes the following changes: - .setimag() --> .imag = - .getimaginary() --> .imag - .setimaginary() --> .imag - + """ __all__ = ['convertfile', 'convertall', 'converttree', 'convertsrc'] @@ -111,14 +111,14 @@ def replaceattr(astr): astr = astr.replace(".is_fortran_contiguous()",".flags.fortran") astr = astr.replace(".itemsize()",".itemsize") astr = astr.replace(".size()",".size") - astr = astr.replace(".nelements()",".size") + astr = astr.replace(".nelements()",".size") astr = astr.replace(".typecode()",".dtype.char") astr = astr.replace(".stddev()",".std()") astr = astr.replace(".getshape()", ".shape") astr = astr.replace(".getflat()", ".ravel()") astr = astr.replace(".getreal", ".real") astr = astr.replace(".getimag", ".imag") - astr = astr.replace(".getimaginary", ".imag") + astr = astr.replace(".getimaginary", ".imag") # preserve uses of flat that should be o.k. tmpstr = flatindex_re.sub(r"@@@@\2",astr) @@ -161,9 +161,9 @@ def replaceother(astr): astr = setshape_re.sub('\\1.shape = \\2', astr) astr = setreal_re.sub('\\1.real = \\2', astr) astr = setimag_re.sub('\\1.imag = \\2', astr) - astr = setimaginary_re.sub('\\1.imag = \\2', astr) + astr = setimaginary_re.sub('\\1.imag = \\2', astr) return astr - + import datetime def fromstr(filestr): savestr = filestr[:] @@ -249,7 +249,7 @@ def convertsrc(direc=os.path.curdir, ext=None, orig=1): else: os.remove(afile) makenewfile(afile, fstr) - + def _func(arg, dirname, fnames): convertall(dirname, orig=0) convertsrc(dirname, ['h','c'], orig=0) |