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

numpy-svn@scip... numpy-svn@scip...
Thu Nov 6 09:25:02 CST 2008


Author: charris
Date: 2008-11-06 09:24:51 -0600 (Thu, 06 Nov 2008)
New Revision: 5979

Modified:
   trunk/numpy/core/code_generators/generate_umath.py
   trunk/numpy/core/src/umathmodule.c.src
Log:
Rename logsumexp to logaddexp.
Add ufuncs deg2rad and rad2deg.

Modified: trunk/numpy/core/code_generators/generate_umath.py
===================================================================
--- trunk/numpy/core/code_generators/generate_umath.py	2008-11-06 12:52:26 UTC (rev 5978)
+++ trunk/numpy/core/code_generators/generate_umath.py	2008-11-06 15:24:51 UTC (rev 5979)
@@ -328,10 +328,10 @@
           TD(noobj),
           TD(O, f='_npy_ObjectMin')
           ),
-'logsumexp' :
+'logaddexp' :
     Ufunc(2, 1, None,
           "",
-          TD(flts, f="logsumexp")
+          TD(flts, f="logaddexp")
           ),
 'logsumexp' :
     Ufunc(2, 1, None,
@@ -379,11 +379,21 @@
           docstrings.get('numpy.core.umath.degrees'),
           TD(fltsM, f='degrees'),
           ),
+'rad2deg' :
+    Ufunc(1, 1, None,
+          '',
+          TD(fltsM, f='rad2deg'),
+          ),
 'radians' :
     Ufunc(1, 1, None,
           docstrings.get('numpy.core.umath.radians'),
           TD(fltsM, f='radians'),
           ),
+'deg2rad' :
+    Ufunc(1, 1, None,
+          '',
+          TD(fltsM, f='deg2rad'),
+          ),
 'arccos' :
     Ufunc(1, 1, None,
           docstrings.get('numpy.core.umath.arccos'),

Modified: trunk/numpy/core/src/umathmodule.c.src
===================================================================
--- trunk/numpy/core/src/umathmodule.c.src	2008-11-06 12:52:26 UTC (rev 5978)
+++ trunk/numpy/core/src/umathmodule.c.src	2008-11-06 15:24:51 UTC (rev 5979)
@@ -50,7 +50,7 @@
 }
 
 static @type@
-logsumexp@c@(@type@ x, @type@ y)
+logaddexp@c@(@type@ x, @type@ y)
 {
     const @type@ tmp = x - y;
     if (tmp > 0) {



More information about the Numpy-svn mailing list