From 983d007f4f130e6cbb21e4fcd27419a3206de782 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 26 Jun 2021 23:54:38 -0500 Subject: [PATCH] Improve deprecation message for force_device_scalars --- arraycontext/impl/pyopencl/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arraycontext/impl/pyopencl/__init__.py b/arraycontext/impl/pyopencl/__init__.py index 788dcdb..aaf1ce4 100644 --- a/arraycontext/impl/pyopencl/__init__.py +++ b/arraycontext/impl/pyopencl/__init__.py @@ -101,8 +101,11 @@ class PyOpenCLArrayContext(ArrayContext): to the host. """ if not force_device_scalars: - warn("Returning host scalars from the array context is deprecated. " - "To return device scalars set 'force_device_scalars=True'. " + warn("Configuring the PyOpenCLArrayContext to return host scalars " + "from reductions is deprecated. " + "To configure the PyOpenCLArrayContext to return " + "device scalars, pass 'force_device_scalars=True' to the " + "constructor. " "Support for returning host scalars will be removed in 2022.", DeprecationWarning, stacklevel=2) -- GitLab