summaryrefslogtreecommitdiff
path: root/numpy/core/records.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-11-04 21:17:24 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-11-04 21:17:24 +0000
commitc0c1bea69b11881bebf483ce0c961812a27f061c (patch)
tree7d088e63576f380d882df70e733fe6c883079232 /numpy/core/records.py
parent2b5e6e4c7e74adbd826b28eec4432eadc86ffd92 (diff)
downloadnumpy-c0c1bea69b11881bebf483ce0c961812a27f061c.tar.gz
Fix auto-naming in records.py
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r--numpy/core/records.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py
index 8bcc0c481..838372cf2 100644
--- a/numpy/core/records.py
+++ b/numpy/core/records.py
@@ -82,11 +82,12 @@ class format_parser:
else:
self._names = []
- # if the names are not specified, they will be assigned as "f1, f2,..."
- # if not enough names are specified, they will be assigned as "f[n+1],
- # f[n+2],..." etc. where n is the number of specified names..."
- self._names += ['f%d' % i for i in range(len(self._names)+1,
- self._nfields+1)]
+ # if the names are not specified, they will be assigned as
+ # "f0, f1, f2,..."
+ # if not enough names are specified, they will be assigned as "f[n],
+ # f[n+1],..." etc. where n is the number of specified names..."
+ self._names += ['f%d' % i for i in range(len(self._names),
+ self._nfields)]
# check for redundant names
_dup = find_duplicate(self._names)
if _dup: