[python-dtcwt] 182/497: openl: fix typo divisable -> divisible
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:02 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 2cd96b099313f627328a8abe191883748eb55954
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Sun Nov 10 15:09:02 2013 +0000
openl: fix typo divisable -> divisible
---
dtcwt/opencl/transform2d.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/dtcwt/opencl/transform2d.py b/dtcwt/opencl/transform2d.py
index e5d16c0..32feb51 100644
--- a/dtcwt/opencl/transform2d.py
+++ b/dtcwt/opencl/transform2d.py
@@ -11,6 +11,12 @@ from dtcwt.opencl.lowlevel import colfilter, coldfilt, colifilt
from dtcwt.opencl.lowlevel import axis_convolve, axis_convolve_dfilter, q2c
from dtcwt.opencl.lowlevel import to_device, to_queue, to_array, empty
+try:
+ from pyopencl.array import concatenate
+except ImportError:
+ # The lack of OpenCL will be caught by the low-level routines.
+ pass
+
def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include_scale=False, queue=None):
"""Perform a *n*-level DTCWT-2D decompostion on a 2D matrix *X*.
@@ -66,12 +72,12 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
initial_row_extend = 0 #initialise
initial_col_extend = 0
if original_size[0] % 2 != 0:
- # if X.shape[0] is not divisable by 2 then we need to extend X by adding a row at the bottom
+ # if X.shape[0] is not divisible by 2 then we need to extend X by adding a row at the bottom
X = np.vstack((X, X[[-1],:])) # Any further extension will be done in due course.
initial_row_extend = 1
if original_size[1] % 2 != 0:
- # if X.shape[1] is not divisable by 2 then we need to extend X by adding a col to the left
+ # if X.shape[1] is not divisible by 2 then we need to extend X by adding a col to the left
X = np.hstack((X, X[:,[-1]]))
initial_col_extend = 1
@@ -110,13 +116,14 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
for level in xrange(1, nlevels):
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
+ # Extend by 2 rows if no. of rows of LoLo are not divisible by 4
LoLo = to_array(LoLo)
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
+ # Extend by 2 cols if no. of cols of LoLo are not divisible by 4
LoLo = to_array(LoLo)
LoLo = np.hstack((LoLo[:,:1], LoLo, LoLo[:,-1:]))
--
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