diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-03-08 21:32:24 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-03-08 21:32:24 +0000 |
commit | 07d036080bcac11ef5ff601b5f6a3215fed230c8 (patch) | |
tree | 2457733273568509533b40e6f4d972dc6b131948 /numpy/core/defchararray.py | |
parent | d4f1427519a22608b947397a9c746e7ad1a764e1 (diff) | |
download | numpy-07d036080bcac11ef5ff601b5f6a3215fed230c8.tar.gz |
Fix tabs-to-spaces and unused import re: ticket #26
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r-- | numpy/core/defchararray.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index 6f28b3d77..79cc9b69a 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -1,5 +1,4 @@ -from numerictypes import character, string, unicode_, \ - integer, object_ +from numerictypes import string, unicode_, integer, object_ from numeric import ndarray, broadcast, empty from numeric import array as narray import sys @@ -47,8 +46,8 @@ class chararray(ndarray): res = result.flat for k, val in enumerate(b): r1 = val[0].rstrip('\x00') - r2 = val[1] - res[k] = eval("r1 %s r2" % op, {'r1':r1,'r2':r2}) + r2 = val[1] + res[k] = eval("r1 %s r2" % op, {'r1':r1,'r2':r2}) return result # these should probably be moved to C @@ -142,7 +141,7 @@ class chararray(ndarray): maxsize = max(len(newitem), maxsize) res[k] = newitem newarr = chararray(myiter.shape, maxsize, self.dtype is unicode_) - print res, maxsize + print res, maxsize newarr[:] = res return newarr |