[Numpy-svn] r6213 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Dec 27 10:15:58 CST 2008


Author: cdavid
Date: 2008-12-27 10:15:41 -0600 (Sat, 27 Dec 2008)
New Revision: 6213

Modified:
   trunk/numpy/core/src/scalartypes.inc.src
Log:
Fix formatting.

Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src	2008-12-27 16:15:04 UTC (rev 6212)
+++ trunk/numpy/core/src/scalartypes.inc.src	2008-12-27 16:15:41 UTC (rev 6213)
@@ -639,32 +639,32 @@
     }
 
     if (*cp == '\0') {
-	cp[0] = '.';
-	cp[1] = '0';
-	cp[2] = '\0';
-	cp += 3;
-	return ;
+        cp[0] = '.';
+        cp[1] = '0';
+        cp[2] = '\0';
+        cp += 3;
+        return ;
     }
     /* Checking the next three chars should be more than enough to
      * detect inf or nan, even on Windows. We check for inf or nan
      * at last because they are rare cases.
      */
     for (i=0; *cp != '\0' && i<3; cp++, i++) {
-	if (isdigit(Py_CHARMASK(*cp)) || *cp == '.') {
-	    continue;
-	}
-	/* found something that is neither a digit nor point
-	* it might be a NaN or INF
-	*/
-	if (isnan(val)) {
-	    strcpy(buf, "nan");
+        if (isdigit(Py_CHARMASK(*cp)) || *cp == '.') {
+            continue;
         }
-	else if (isinf(val)) {
-           cp = buf;
-           if (*cp == '-') {
+        /* found something that is neither a digit nor point
+         * it might be a NaN or INF
+         */
+        if (isnan(val)) {
+            strcpy(buf, "nan");
+        }
+        else if (isinf(val)) {
+            cp = buf;
+            if (*cp == '-') {
                 cp++;
-           }
-           strcpy(cp, "inf");
+            }
+            strcpy(cp, "inf");
         }
         break;
     }



More information about the Numpy-svn mailing list