[python-dtcwt] 86/497: transform3d: fix ext_mode==4 behaviour

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:05:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.

commit f24ab96613da41acbc91842b0977f23ded0f2df9
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Fri Aug 9 13:15:42 2013 +0100

    transform3d: fix ext_mode==4 behaviour
    
    The concatenation used for ext_mode==4 behaviour was incorrect.
    
    TODO: check to see if this affect the inverse.
---
 dtcwt/transform3d.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dtcwt/transform3d.py b/dtcwt/transform3d.py
index 9fcd111..b58a67d 100644
--- a/dtcwt/transform3d.py
+++ b/dtcwt/transform3d.py
@@ -232,11 +232,11 @@ def _level2_xfm(X, h0a, h0b, h1a, h1b, ext_mode):
 
     if ext_mode == 4:
         if X.shape[0] % 4 != 0:
-            X = np.concatenate((X[0,:,:], X, X[-1,:,:]), 0)
+            X = np.concatenate((X[[0],:,:], X, X[[-1],:,:]), 0)
         if X.shape[1] % 4 != 0:
-            X = np.concatenate((X[:,0,:], X, X[:,-1,:]), 1)
+            X = np.concatenate((X[:,[0],:], X, X[:,[-1],:]), 1)
         if X.shape[2] % 4 != 0:
-            X = np.concatenate((X[:,:,0], X, X[:,:,-1]), 2)
+            X = np.concatenate((X[:,:,[0]], X, X[:,:,[-1]]), 2)
     elif ext_mode == 8:
         if X.shape[0] % 8 != 0:
             X = np.concatenate((X[(0,0),:,:], X, X[(-1,-1),:,:]), 0)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git



More information about the debian-science-commits mailing list