summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric
diff options
context:
space:
mode:
authorJarrod Millman <millman@berkeley.edu>2007-10-29 14:37:37 +0000
committerJarrod Millman <millman@berkeley.edu>2007-10-29 14:37:37 +0000
commit06b316521a47470e0cce864e142c9372d14637dc (patch)
treef7a0867626c44d1f5f83fc8a6e884c9f2d24884c /numpy/oldnumeric
parent3cb37bbdb4bdf773b7bc0098b8d0cf940288a883 (diff)
downloadnumpy-06b316521a47470e0cce864e142c9372d14637dc.tar.gz
using faster string methods rather than deprecated string module
Diffstat (limited to 'numpy/oldnumeric')
-rw-r--r--numpy/oldnumeric/matrix.py3
-rw-r--r--numpy/oldnumeric/precision.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/numpy/oldnumeric/matrix.py b/numpy/oldnumeric/matrix.py
index 7c5b3700c..5f8c1ca5e 100644
--- a/numpy/oldnumeric/matrix.py
+++ b/numpy/oldnumeric/matrix.py
@@ -2,7 +2,6 @@
__all__ = ['UserArray', 'squeeze', 'Matrix', 'asarray', 'dot', 'k', 'Numeric', 'LinearAlgebra', 'identity', 'multiply', 'types', 'string']
-import string
import types
from user_array import UserArray, asarray
import numpy.oldnumeric as Numeric
@@ -17,7 +16,7 @@ for k in range(256):
_table[k] = chr(k)
_table = ''.join(_table)
-_numchars = string.digits + ".-+jeEL"
+_numchars = '0123456789.-+jeEL'
_todelete = []
for k in _table:
if k not in _numchars:
diff --git a/numpy/oldnumeric/precision.py b/numpy/oldnumeric/precision.py
index f495992a8..51dd77454 100644
--- a/numpy/oldnumeric/precision.py
+++ b/numpy/oldnumeric/precision.py
@@ -7,8 +7,8 @@ __all__ = ['Character', 'Complex', 'Float',
'PrecisionError', 'PyObject', 'Int', 'UInt',
'UnsignedInteger', 'string', 'typecodes', 'zeros']
-import string
from functions import zeros
+import string # for backwards compatibility
typecodes = {'Character':'c', 'Integer':'bhil', 'UnsignedInteger':'BHI', 'Float':'fd', 'Complex':'FD'}