[python-dtcwt] 152/497: opencl: speculative fix for non-C-contiguous arrays

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:05:59 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 338226456d745d7902438b4503a9b90a2d4a4a53
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Thu Nov 7 18:52:08 2013 +0000

    opencl: speculative fix for non-C-contiguous arrays
    
    On my machine, the original code works fine but under travis, it moans
    about C-contiguity of arrays. Specify explicitly that the output should
    be C-contiguous.
---
 dtcwt/opencl/lowlevel.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dtcwt/opencl/lowlevel.py b/dtcwt/opencl/lowlevel.py
index c528649..8b13dba 100644
--- a/dtcwt/opencl/lowlevel.py
+++ b/dtcwt/opencl/lowlevel.py
@@ -236,7 +236,7 @@ def _to_queue(queue):
 def _to_device(X, queue=None):
     if isinstance(X, cl_array.Array) and X.queue is queue:
         return X
-    return cl_array.to_device(_to_queue(queue), np.array(X, dtype=np.float32))
+    return cl_array.to_device(_to_queue(queue), np.array(X, dtype=np.float32, order='C'))
 
 def to_array(a, queue=None):
     queue = queue or a.queue or _to_queue(queue)

-- 
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