[python-dtcwt] 171/497: use a faster slice-based method in dtwavexfm2
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:01 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 a1bcbefe080a28c68be9ba677be245e654d32981
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Sat Nov 9 13:50:13 2013 +0000
use a faster slice-based method in dtwavexfm2
---
dtcwt/transform2d.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dtcwt/transform2d.py b/dtcwt/transform2d.py
index b7bd02d..2d8e124 100644
--- a/dtcwt/transform2d.py
+++ b/dtcwt/transform2d.py
@@ -105,11 +105,11 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
row_size, col_size = LoLo.shape
if row_size % 4 != 0:
# Extend by 2 rows if no. of rows of LoLo are not divisable by 4
- LoLo = np.vstack((LoLo[[0],:], LoLo, LoLo[[-1],:]))
+ LoLo = np.vstack((LoLo[:1,:], LoLo, LoLo[-1:,:]))
if col_size % 4 != 0:
# Extend by 2 cols if no. of cols of LoLo are not divisable by 4
- LoLo = np.hstack((LoLo[:,[0]], LoLo, LoLo[:,[-1]]))
+ LoLo = np.hstack((LoLo[:,:1], LoLo, LoLo[:,-1:]))
# Do even Qshift filters on rows.
Lo = coldfilt(LoLo,h0b,h0a).T
--
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