From 58012fe9747dd598d5c06c659b61dba2731df676 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Tue, 11 Aug 2015 12:00:04 -0500 Subject: [PATCH] Fix _new_like_me mishandling allocator-but-no-queue situation (reported by Henry Gomersall) --- pyopencl/array.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyopencl/array.py b/pyopencl/array.py index c8fd1ed4..713771f6 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -859,12 +859,9 @@ class Array(object): if queue is not None: return self.__class__(queue, self.shape, dtype, allocator=self.allocator, strides=strides) - elif self.allocator is not None: - return self.__class__(self.allocator, self.shape, dtype, - strides=strides) else: return self.__class__(self.context, self.shape, dtype, - strides=strides) + strides=strides, allocator=self.allocator) # }}} -- GitLab