From 991135bfddf304b082b790912a7e76c65f48d176 Mon Sep 17 00:00:00 2001
From: Kaushik Kulkarni <kaushikcfd@gmail.com>
Date: Thu, 20 May 2021 16:32:44 -0500
Subject: [PATCH] fixup! extend cla.(maximum|minimum|if_positive) to take
 scalars

- always return 'out' even when the user provides a buffer for it
---
 pyopencl/array.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyopencl/array.py b/pyopencl/array.py
index e563ccdf..c05ab2f0 100644
--- a/pyopencl/array.py
+++ b/pyopencl/array.py
@@ -2714,7 +2714,7 @@ def if_positive(criterion, then_, else_, out=None, queue=None):
 
         if out is not None:
             out[...] = result
-            return
+            return out
 
         return result
 
@@ -2737,7 +2737,7 @@ def maximum(a, b, out=None, queue=None):
         result = np.maximum(a, b)
         if out is not None:
             out[...] = result
-            return
+            return out
 
         return result
 
@@ -2752,7 +2752,7 @@ def minimum(a, b, out=None, queue=None):
         result = np.minimum(a, b)
         if out is not None:
             out[...] = result
-            return
+            return out
 
         return result
     # silly, but functional
-- 
GitLab