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,