diff --git a/pyopencl/array.py b/pyopencl/array.py index 7ee89b184d7abf98363496e2a75bfd2622145481..b8fde35ed0cc91d5161307b76ca011cc5cb5fa1e 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -3077,6 +3077,9 @@ def subset_dot(subset, a, b, dtype=None, queue=None, slice=None): def _make_minmax_kernel(what): def f(a, queue=None, initial=np._NoValue): + if isinstance(a, SCALAR_CLASSES): + return np.array(a).dtype.type(a) + if len(a) == 0: if initial is np._NoValue: raise ValueError(