From 0f9133215e3fe6955a6da78d99fdde540b24cc3f Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni <kaushikcfd@gmail.com> Date: Mon, 20 Sep 2021 16:21:42 -0500 Subject: [PATCH] defines PytatoFakeNumpyNamespace.broadcast_to --- arraycontext/impl/pytato/fake_numpy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arraycontext/impl/pytato/fake_numpy.py b/arraycontext/impl/pytato/fake_numpy.py index f89bc45..3fcc736 100644 --- a/arraycontext/impl/pytato/fake_numpy.py +++ b/arraycontext/impl/pytato/fake_numpy.py @@ -107,6 +107,9 @@ class PytatoFakeNumpyNamespace(BaseFakeNumpyNamespace): lambda *args: pt.stack(arrays=args, axis=axis), *arrays) + def broadcast_to(self, array, shape): + return rec_map_array_container(partial(pt.broadcast_to, shape=shape), array) + # {{{ relational operators def equal(self, x, y): -- GitLab