[Numpy-svn] r6036 - in trunk/numpy/core: code_generators src

numpy-svn@scip... numpy-svn@scip...
Sun Nov 16 00:23:36 CST 2008


Author: charris
Date: 2008-11-16 00:23:29 -0600 (Sun, 16 Nov 2008)
New Revision: 6036

Modified:
   trunk/numpy/core/code_generators/generate_umath.py
   trunk/numpy/core/src/umathmodule.c.src
Log:
Add missing return.
Remove pointless define.
Small name cleanup.

Modified: trunk/numpy/core/code_generators/generate_umath.py
===================================================================
--- trunk/numpy/core/code_generators/generate_umath.py	2008-11-16 04:01:01 UTC (rev 6035)
+++ trunk/numpy/core/code_generators/generate_umath.py	2008-11-16 06:23:29 UTC (rev 6036)
@@ -229,7 +229,7 @@
           docstrings.get('numpy.core.umath.power'),
           TD(ints),
           TD(inexact, f='pow'),
-          TD(O, f='PyNumber_Power'),
+          TD(O, f='npy_ObjectPower'),
           ),
 'absolute' :
     Ufunc(1, 1, None,
@@ -308,25 +308,25 @@
     Ufunc(2, 1, None,
           docstrings.get('numpy.core.umath.maximum'),
           TD(noobj),
-          TD(O, f='_npy_ObjectMax')
+          TD(O, f='npy_ObjectMax')
           ),
 'minimum' :
     Ufunc(2, 1, None,
           docstrings.get('numpy.core.umath.minimum'),
           TD(noobj),
-          TD(O, f='_npy_ObjectMin')
+          TD(O, f='npy_ObjectMin')
           ),
 'fmax' :
     Ufunc(2, 1, None,
           "",
           TD(noobj),
-          TD(O, f='_npy_ObjectMax')
+          TD(O, f='npy_ObjectMax')
           ),
 'fmin' :
     Ufunc(2, 1, None,
           "",
           TD(noobj),
-          TD(O, f='_npy_ObjectMin')
+          TD(O, f='npy_ObjectMin')
           ),
 'logaddexp' :
     Ufunc(2, 1, None,

Modified: trunk/numpy/core/src/umathmodule.c.src
===================================================================
--- trunk/numpy/core/src/umathmodule.c.src	2008-11-16 04:01:01 UTC (rev 6035)
+++ trunk/numpy/core/src/umathmodule.c.src	2008-11-16 06:23:29 UTC (rev 6036)
@@ -143,18 +143,17 @@
  * Define numpy version of PyNumber_Power as binary function.
  */
 static PyObject *
-npy_PyNumber_Power(PyObject *x, PyObject *y)
+npy_ObjectPower(PyObject *x, PyObject *y)
 {
-    PyNumber_Power(x, y, Py_None);
+    return PyNumber_Power(x, y, Py_None);
 }
-#define PyNumber_Power npy_PyNumber_Power
 
 /**begin repeat
  * #Kind = Max, Min#
  * #OP = >=, <=#
  */
 static PyObject *
-_npy_Object@Kind@(PyObject *i1, PyObject *i2)
+npy_Object@Kind@(PyObject *i1, PyObject *i2)
 {
     PyObject *result;
     int cmp;
@@ -173,6 +172,7 @@
 }
 /**end repeat**/
 
+
 /*
  *****************************************************************************
  **                           COMPLEX FUNCTIONS                             **



More information about the Numpy-svn mailing list