From 2e3e49665ed40098f9efa1ed0d27b5fdd250d5eb Mon Sep 17 00:00:00 2001
From: Kaushik Kulkarni <kaushikcfd@gmail.com>
Date: Wed, 2 Jun 2021 17:02:01 -0500
Subject: [PATCH] adds relational ops

---
 arraycontext/impl/pytato.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arraycontext/impl/pytato.py b/arraycontext/impl/pytato.py
index 097e031..426c073 100644
--- a/arraycontext/impl/pytato.py
+++ b/arraycontext/impl/pytato.py
@@ -114,6 +114,34 @@ class _PytatoFakeNumpyNamespace(BaseFakeNumpyNamespace):
         import pytato as pt
         return rec_multimap_array_container(pt.stack, arrays, axis)
 
+    # {{{ relational operators
+
+    def equal(self, x, y):
+        import pytato as pt
+        return rec_multimap_array_container(pt.equal, x, y)
+
+    def not_equal(self, x, y):
+        import pytato as pt
+        return rec_multimap_array_container(pt.not_equal, x, y)
+
+    def greater(self, x, y):
+        import pytato as pt
+        return rec_multimap_array_container(pt.greater, x, y)
+
+    def greater_equal(self, x, y):
+        import pytato as pt
+        return rec_multimap_array_container(pt.greater_equal, x, y)
+
+    def less(self, x, y):
+        import pytato as pt
+        return rec_multimap_array_container(pt.less, x, y)
+
+    def less_equal(self, x, y):
+        import pytato as pt
+        return rec_multimap_array_container(pt.less_equal, x, y)
+
+    # }}}
+
 
 class PytatoCompiledOperator:
     def __init__(self, actx, pytato_program, input_spec, output_spec):
-- 
GitLab