tags 625154 + patch
tags 625154 + pending
thanks

Dear maintainer,

I've prepared an NMU for pyentropy (versioned as 0.4-1.1) and uploaded it to DELAYED/5. Please feel free to tell me if I should delay it longer.

--
Jakub Wilk
diffstat for pyentropy_0.4-1 pyentropy_0.4-1.1

 pyentropy-0.4/debian/changelog |    8 ++++++++
 pyentropy/maxent.py            |   14 +++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff -u pyentropy-0.4/debian/changelog pyentropy-0.4/debian/changelog
--- pyentropy-0.4/debian/changelog
+++ pyentropy-0.4/debian/changelog
@@ -1,3 +1,11 @@
+pyentropy (0.4-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Use multiplication operator rather then deprecated (and eventually
+    removed) matvec method (closes: #625154).
+
+ -- Jakub Wilk <jw...@debian.org>  Mon, 15 Aug 2011 14:45:49 +0200
+
 pyentropy (0.4-1) unstable; urgency=low
 
   * New upstream release
only in patch2:
unchanged:
--- pyentropy-0.4.orig/pyentropy/maxent.py
+++ pyentropy-0.4/pyentropy/maxent.py
@@ -354,7 +354,7 @@
         if eta_given:
             eta_sampled = Pr[:l]
         else:
-            eta_sampled = Asmall.matvec(Pr[1:])
+            eta_sampled = Asmall * Pr[1:]
 
         if jacobian:
             self.optout = opt.fsolve(sf, x0, (Asmall,Bsmall,eta_sampled, l), 
@@ -382,13 +382,13 @@
         return Psolve
 
     def _solvefunc(self, theta_un, Asmall, Bsmall, eta_sampled, l):
-        b = np.exp(Bsmall.matvec(theta_un))
-        y = eta_sampled - ( Asmall.matvec(b) / (b.sum()+1) )
+        b = np.exp(Bsmall * theta_un)
+        y = eta_sampled - ( Asmall * b / (b.sum()+1) )
         return y
 
     def _jacobian(self, theta, Asmall, Bsmall, eta_sampled, l):
-        x = np.exp(Bsmall.matvec(theta))
-        p = Asmall.matvec(x)
+        x = np.exp(Bsmall * theta)
+        p = Asmall * x
         q = x.sum() + 1
 
         J = np.outer(p,p)
@@ -403,7 +403,7 @@
     def _p_from_theta(self, theta):
         """Internal version - stays in dim space (missing p[0])"""
         pnorm = lambda p: ( p / (p.sum()+1) )
-        return pnorm(np.exp(self.A.T.matvec(theta)))
+        return pnorm(np.exp(self.A.T * theta))
 
     def p_from_theta(self, theta):
         """Return full ``fdim`` p-vector from ``fdim-1`` length theta"""
@@ -425,7 +425,7 @@
 
     def eta_from_p(self, p):
         """Return eta-vector (marginals) from full probability vector"""
-        return self.A.matvec(p[1:])
+        return self.A * p[1:]
 
 
 def inscol(x,h,n):

Reply via email to