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

numpy-svn at scipy.org numpy-svn at scipy.org
Sun Aug 13 03:24:00 EDT 2006


Author: oliphant
Date: 2006-08-13 02:23:58 -0500 (Sun, 13 Aug 2006)
New Revision: 3004

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Fix ticket #243

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2006-08-13 07:15:52 UTC (rev 3003)
+++ trunk/numpy/core/src/multiarraymodule.c	2006-08-13 07:23:58 UTC (rev 3004)
@@ -295,6 +295,7 @@
                                                      PyArray_ISFORTRAN(a));
                 if (out == NULL) return NULL;
         }
+        else Py_INCREF(out);
         f = PyFloat_FromDouble(power_of_ten(decimals));
         if (f==NULL) return NULL;
         ret = PyObject_CallFunction(op1, "OOO", a, f, out);
@@ -308,6 +309,7 @@
 
  finish:
 	Py_DECREF(f);
+        Py_DECREF(out);
 	return ret;
 	
 }




More information about the Numpy-svn mailing list