diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-11-04 09:37:00 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-11-04 09:37:00 +0000 |
commit | 705ba54e977632aad5a766bb353c63e4032c10c6 (patch) | |
tree | a1fcbacbb7d9080762a6e2406ded8e554a43aa09 | |
parent | 6e3f146825a4287a8195a092173571d2af84b669 (diff) | |
download | numpy-705ba54e977632aad5a766bb353c63e4032c10c6.tar.gz |
Fixed some type issues.
-rw-r--r-- | scipy/base/numerictypes.py | 5 | ||||
-rw-r--r-- | scipy/base/oldnumeric.py | 22 |
2 files changed, 14 insertions, 13 deletions
diff --git a/scipy/base/numerictypes.py b/scipy/base/numerictypes.py index 8d30cd24e..df0376b9b 100644 --- a/scipy/base/numerictypes.py +++ b/scipy/base/numerictypes.py @@ -212,8 +212,9 @@ _dtype2char_dict = {} def _construct_char_code_lookup(): for name in typeinfo.keys(): tup = typeinfo[name] - if isinstance(tup, type(())): - _dtype2char_dict[tup[-1]] = tup[0] + if isinstance(tup, tuple): + if tup[0] not in ['p','P']: + _dtype2char_dict[tup[-1]] = tup[0] _construct_char_code_lookup() arraytypes = {'int': [], diff --git a/scipy/base/oldnumeric.py b/scipy/base/oldnumeric.py index 14b55b078..33df35007 100644 --- a/scipy/base/oldnumeric.py +++ b/scipy/base/oldnumeric.py @@ -72,13 +72,13 @@ except AttributeError: else: __all__ += ['Int64', 'Int128'] -Int0 = _dt_(nt.int) -Int = _dt_(nt.int) -Float0 = _dt_(nt.float) -Float = _dt_(nt.float) -Complex0 = _dt_(nt.complex) -Complex = _dt_(nt.complex) -PyObject = _dt_(nt.object) +Int0 = _dt_(int) +Int = _dt_(int) +Float0 = _dt_(float) +Float = _dt_(float) +Complex0 = _dt_(complex) +Complex = _dt_(complex) +PyObject = _dt_(nt.object_) Float32 = _dt_(nt.float32) Float64 = _dt_(nt.float64) @@ -100,13 +100,13 @@ else: __all__ += ['Complex128'] typecodes = {'Character':'S1', - 'Integer':'bhilq', - 'UnsignedInteger':'BHILQ', + 'Integer':'bhilqp', + 'UnsignedInteger':'BHILQP', 'Float':'fdg', 'Complex':'FDG', - 'AllInteger':'bBhHiIlLqQ', + 'AllInteger':'bBhHiIlLqQpP', 'AllFloat':'fdgFDG', - 'All':'?bhilqBHILQfdgFDGSUVO'} + 'All':'?bhilqpBHILQPfdgFDGSUVO'} def sarray(a, dtype=None, copy=False): return array(a, dtype, copy) |