From 554bb56fd4c0c7bf1fbdab657adf68aee82e603f Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Mon, 13 Jul 2020 15:14:57 -0500
Subject: [PATCH] ArrayContext.np: deprecate atan2, normalize arctan2

---
 meshmode/array_context.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meshmode/array_context.py b/meshmode/array_context.py
index 6118e9d5..81461b71 100644
--- a/meshmode/array_context.py
+++ b/meshmode/array_context.py
@@ -153,6 +153,14 @@ class ArrayContext:
 
     @memoize_method
     def _get_scalar_func_loopy_program(self, name, nargs, naxes):
+        if name == "arctan2":
+            name = "atan2"
+        elif name == "atan2":
+            from warnings import warn
+            warn("'atan2' in ArrayContext.np is deprecated. Use 'arctan2', "
+                    "as in numpy2. This will be disallowed in 2021.",
+                    DeprecationWarning, stacklevel=3)
+
         from pymbolic import var
 
         var_names = ["i%d" % i for i in range(naxes)]
-- 
GitLab