From a25b748694de2fd6cc42a2edeb6d392d06a2268e Mon Sep 17 00:00:00 2001 From: brumen Date: Fri, 12 Mar 2021 14:35:36 -0500 Subject: [PATCH] binary operations make a bool array --- pycuda/gpuarray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycuda/gpuarray.py b/pycuda/gpuarray.py index f5908a06..add0e663 100644 --- a/pycuda/gpuarray.py +++ b/pycuda/gpuarray.py @@ -146,7 +146,7 @@ def func(self, other): "be used as arguments to this operation" ) - result = self._new_like_me() + result = self._new_like_me(dtype=bool) # create bool array func = elementwise.get_binary_op_kernel( self.dtype, other.dtype, result.dtype, operator ) @@ -162,7 +162,7 @@ def func(self, other): return result else: # scalar operator - result = self._new_like_me() + result = self._new_like_me(dtype=bool) func = elementwise.get_scalar_op_kernel(self.dtype, result.dtype, operator) func.prepared_async_call( self._grid,