[Numpy-svn] r4760 - in trunk/numpy: . core/src

numpy-svn@scip... numpy-svn@scip...
Mon Jan 28 21:14:06 CST 2008


Author: oliphant
Date: 2008-01-28 21:14:01 -0600 (Mon, 28 Jan 2008)
New Revision: 4760

Modified:
   trunk/numpy/add_newdocs.py
   trunk/numpy/core/src/arraytypes.inc.src
Log:
Fix fromstring to match fromfile behavior when parsing integers (base-10 only).  Ticket #650

Modified: trunk/numpy/add_newdocs.py
===================================================================
--- trunk/numpy/add_newdocs.py	2008-01-28 23:14:08 UTC (rev 4759)
+++ trunk/numpy/add_newdocs.py	2008-01-29 03:14:01 UTC (rev 4760)
@@ -216,6 +216,7 @@
     size is determined by the size of string.  If sep is not empty then the
     string is interpreted in ASCII mode and converted to the desired number type
     using sep as the separator between elements (extra whitespace is ignored).
+    ASCII integer conversions are base-10; octal and hex are not supported.
 
     """)
 

Modified: trunk/numpy/core/src/arraytypes.inc.src
===================================================================
--- trunk/numpy/core/src/arraytypes.inc.src	2008-01-28 23:14:08 UTC (rev 4759)
+++ trunk/numpy/core/src/arraytypes.inc.src	2008-01-29 03:14:01 UTC (rev 4760)
@@ -934,7 +934,7 @@
 {
         @btype@ result;
 
-        result = PyOS_strto@func@(str, endptr, 0);
+        result = PyOS_strto@func@(str, endptr, 10);
         *ip = (@type@) result;
         return 0;
 }



More information about the Numpy-svn mailing list