[Scipy-svn] r6919 - trunk/scipy/maxentropy
scipy-svn at scipy.org
scipy-svn at scipy.org
Sat Nov 20 02:21:44 EST 2010
Author: warren.weckesser
Date: 2010-11-20 01:21:44 -0600 (Sat, 20 Nov 2010)
New Revision: 6919
Modified:
trunk/scipy/maxentropy/maxentropy.py
Log:
BUG: maxentropy: Fix a few glaring mistakes found by pyflakes; has no one every actually *run* this code?!
Modified: trunk/scipy/maxentropy/maxentropy.py
===================================================================
--- trunk/scipy/maxentropy/maxentropy.py 2010-11-20 07:10:13 UTC (rev 6918)
+++ trunk/scipy/maxentropy/maxentropy.py 2010-11-20 07:21:44 UTC (rev 6919)
@@ -489,8 +489,8 @@
return np.exp(self.lognormconst())
- def setsmooth(sigma):
- """Speficies that the entropy dual and gradient should be
+ def setsmooth(self, sigma):
+ """Specifies that the entropy dual and gradient should be
computed with a quadratic penalty term on magnitude of the
parameters. This 'smooths' the model to account for noise in the
target expectation values or to improve robustness when using
@@ -888,7 +888,7 @@
if counts.shape[0] > 1:
try:
# Try converting to a row vector
- p_tilde = count.reshape((1, size))
+ p_tilde = counts.reshape((1, counts.size))
except AttributeError:
raise ValueError("the 'counts' object needs to be a"
" row vector (1 x n) rank-2 array/matrix) or have"
More information about the Scipy-svn
mailing list