summaryrefslogtreecommitdiff
path: root/numpy/core/records.py
diff options
context:
space:
mode:
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: