diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-12-12 20:40:06 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-12-12 20:40:06 +0000 |
commit | bb4910c3f4ae165e8cc11dcfdb51fb4dc1a93b99 (patch) | |
tree | 95a3f75b55c57c3155aa79747e341263703b48bf /scipy/base/records.py | |
parent | c1cc22f8b9992d463c9b31ebdfaa84be506fd717 (diff) | |
download | numpy-bb4910c3f4ae165e8cc11dcfdb51fb4dc1a93b99.tar.gz |
Changed name ndrecarray -> recarray. Disabled default printing and error printing goes to sys.stderr
Diffstat (limited to 'scipy/base/records.py')
-rw-r--r-- | scipy/base/records.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scipy/base/records.py b/scipy/base/records.py index ca823ed99..25503826b 100644 --- a/scipy/base/records.py +++ b/scipy/base/records.py @@ -1,4 +1,4 @@ -__all__ = ['record', 'ndrecarray','format_parser'] +__all__ = ['record', 'recarray','format_parser'] import numeric as sb import numerictypes as nt @@ -14,10 +14,8 @@ format_re = re.compile(r'(?P<repeat> *[(]?[ ,0-9]*[)]? *)(?P<dtype>[A-Za-z0-9.]* numfmt = nt.typeDict - - def find_duplicate(list): - """Find duplication in a list, return a list of dupicated elements""" + """Find duplication in a list, return a list of duplicated elements""" dup = [] for i in range(len(list)): if (list[i] in list[i+1:]): @@ -244,13 +242,13 @@ class record(nt.void): return self.setfield(val, *(self.fields[obj][:2])) -# The ndrecarray is almost identical to a standard array (which supports +# The recarray is almost identical to a standard array (which supports # named fields already) The biggest difference is that it is always of # record data-type, has fields, and can use attribute-lookup to access # those fields. -class ndrecarray(sb.ndarray): +class recarray(sb.ndarray): def __new__(subtype, shape, formats, names=None, titles=None, buf=None, offset=0, strides=None, swap=0, aligned=0): |