From b14cbb50690b80dcac8436de062ed200e91ebeea Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 24 Jun 2017 16:34:50 +0200 Subject: [PATCH 1/2] Fix fancy indexing tests on numpy 1.13 (Closes #2 on gitlab) --- test/test_array.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_array.py b/test/test_array.py index 4c418903..4e90870b 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -1131,12 +1131,12 @@ def test_fancy_indexing(ctx_factory): numpy_dest = np.zeros((4,), np.int32) numpy_idx = np.arange(3, 0, -1, dtype=np.int32) - numpy_src = np.arange(8, 10, dtype=np.int32) + numpy_src = np.arange(8, 11, dtype=np.int32) numpy_dest[numpy_idx] = numpy_src cl_dest = cl_array.zeros(queue, (4,), np.int32) cl_idx = cl_array.arange(queue, 3, 0, -1, dtype=np.int32) - cl_src = cl_array.arange(queue, 8, 10, dtype=np.int32) + cl_src = cl_array.arange(queue, 8, 11, dtype=np.int32) cl_dest[cl_idx] = cl_src assert np.all(numpy_dest == cl_dest.get()) @@ -1172,7 +1172,7 @@ def test_multi_put(ctx_factory): out_compare = [np.zeros((10,), np.float32) for i in range(9)] for i, ary in enumerate(out_compare): - ary[idx.get()] = np.arange(0, 3, dtype=np.float32) + ary[idx.get()] = np.arange(0, 6, dtype=np.float32) cl_array.multi_put(cl_arrays, idx, out=out_arrays) -- GitLab From d93e3c014d957b5590996b4d34fd44a7165d55a6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 24 Jun 2017 16:43:35 +0200 Subject: [PATCH 2/2] XFail test_slice on numpypy for now --- test/test_array.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_array.py b/test/test_array.py index 4e90870b..b68e1cfc 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -768,6 +768,9 @@ def test_diff(ctx_factory): # {{{ slices, concatenation def test_slice(ctx_factory): + if _PYPY: + pytest.xfail("numpypy: spurious as_strided failure") + context = ctx_factory() queue = cl.CommandQueue(context) -- GitLab