[python-dtcwt] 10/497: rationalise reflect() function
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:05:42 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 54499b0129ed48f1a9998c03d7c2b145d0ec5a38
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Tue Aug 6 17:00:14 2013 +0100
rationalise reflect() function
---
dtcwt/lowlevel.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dtcwt/lowlevel.py b/dtcwt/lowlevel.py
index 6dde05b..420fc40 100644
--- a/dtcwt/lowlevel.py
+++ b/dtcwt/lowlevel.py
@@ -24,14 +24,17 @@ def reflect(x, minx, maxx):
y = np.array(x, copy=True)
# Reflect y in maxx.
- y[y > maxx] = 2*maxx - y[y > maxx]
+ t = y > maxx
+ y[t] = 2*maxx - y[t]
while np.any(y < minx):
# Reflect y in minx.
- y[y < minx] = 2*minx - y[y < minx]
+ t = y < minx
+ y[t] = 2*minx - y[t]
# Reflect y in maxx.
- y[y > maxx] = 2*maxx - y[y > maxx]
+ t = y > maxx
+ y[t] = 2*maxx - y[t]
return y
--
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