diff --git a/meshmode/array_context.py b/meshmode/array_context.py index 4405b5ddd23949478a1dd9fe9f5a941f97e003fe..88d3ecf412f033833272d696de2e70c9b35266f6 100644 --- a/meshmode/array_context.py +++ b/meshmode/array_context.py @@ -227,7 +227,7 @@ class _PyOpenCLFakeNumpyNamespace(_BaseFakeNumpyNamespace): @obj_array_vectorized_n_args def where(self, criterion, then, else_): import pyopencl.array as cl_array - return cl_array.if_positive(criterion.astype(np.bool), then, else_) + return cl_array.if_positive(criterion != 0, then, else_) class PyOpenCLArrayContext(ArrayContext):