diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-12 06:39:51 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-12 06:39:51 +0000 |
commit | eb9f5f70bcce4354130bbf68d69d645ccd1d147f (patch) | |
tree | 67bbe9d7839fbf98eb3675ecd6e0bdd0060a096b /numpy/lib/convertcode.py | |
parent | 36d3c1616707659db3c0217688b4ccb5d7838ae1 (diff) | |
download | numpy-eb9f5f70bcce4354130bbf68d69d645ccd1d147f.tar.gz |
Remove global symbols from numpy. Remove use of replacetypechars in convertcode.
Diffstat (limited to 'numpy/lib/convertcode.py')
-rw-r--r-- | numpy/lib/convertcode.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/lib/convertcode.py b/numpy/lib/convertcode.py index b58e56b78..38c10dc82 100644 --- a/numpy/lib/convertcode.py +++ b/numpy/lib/convertcode.py @@ -28,12 +28,13 @@ import glob flatindex_re = re.compile('([.]flat(\s*?[[=]))') +# Not very safe. Disabled for now.. def replacetypechars(astr): -# astr = astr.replace("'s'","'h'") -# astr = astr.replace("'c'","'S1'") + astr = astr.replace("'s'","'h'") + astr = astr.replace("'c'","'S1'") astr = astr.replace("'b'","'B'") astr = astr.replace("'1'","'b'") -# astr = astr.replace("'w'","'H'") + astr = astr.replace("'w'","'H'") astr = astr.replace("'u'","'I'") return astr @@ -90,7 +91,7 @@ def replaceother(astr): import datetime def fromstr(filestr): - filestr = replacetypechars(filestr) + #filestr = replacetypechars(filestr) filestr, fromall1 = changeimports(filestr, 'Numeric', 'numpy.oldnumeric') filestr, fromall1 = changeimports(filestr, 'multiarray', 'numpy.core.multiarray') |