[Numpy-svn] r3429 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Nov 4 16:17:33 EST 2006


Author: oliphant
Date: 2006-11-04 15:17:24 -0600 (Sat, 04 Nov 2006)
New Revision: 3429

Modified:
   trunk/numpy/core/records.py
Log:
Fix auto-naming in records.py

Modified: trunk/numpy/core/records.py
===================================================================
--- trunk/numpy/core/records.py	2006-11-04 01:47:36 UTC (rev 3428)
+++ trunk/numpy/core/records.py	2006-11-04 21:17:24 UTC (rev 3429)
@@ -82,11 +82,12 @@
         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:




More information about the Numpy-svn mailing list