Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binary operations make a bool array #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pycuda/gpuarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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,
Expand Down