[Scipy-svn] r3125 - trunk/Lib/sandbox/pyem

scipy-svn@scip... scipy-svn@scip...
Sun Jul 1 04:31:00 CDT 2007


Author: cdavid
Date: 2007-07-01 04:30:56 -0500 (Sun, 01 Jul 2007)
New Revision: 3125

Modified:
   trunk/Lib/sandbox/pyem/densities.py
Log:
Update docstring of logsumexp.

Modified: trunk/Lib/sandbox/pyem/densities.py
===================================================================
--- trunk/Lib/sandbox/pyem/densities.py	2007-07-01 09:29:34 UTC (rev 3124)
+++ trunk/Lib/sandbox/pyem/densities.py	2007-07-01 09:30:56 UTC (rev 3125)
@@ -1,7 +1,7 @@
 #! /usr/bin/python
 #
 # Copyrighted David Cournapeau
-# Last Change: Tue Jun 12 03:00 PM 2007 J
+# Last Change: Sat Jun 30 04:00 PM 2007 J
 """This module implements various basic functions related to multivariate
 gaussian, such as pdf estimation, confidence interval/ellipsoids, etc..."""
 
@@ -261,7 +261,11 @@
     return elps[0, :], elps[1, :]
 
 def logsumexp(x):
-    """Compute log(sum(exp(a), 1)) while avoiding underflow."""
+    """Compute log(sum(exp(x), 1)) while avoiding underflow.
+    
+    :Parameters:
+        x : ndarray
+            data in log domain to sum"""
     axis = 1
     mc = N.max(x, axis)
     return mc + N.log(N.sum(N.exp(x-mc[:, N.newaxis]), axis))



More information about the Scipy-svn mailing list