Skip to content
Snippets Groups Projects
Commit 5224c167 authored by Kaushik Kulkarni's avatar Kaushik Kulkarni
Browse files

take advantage of the fact that super is the one that set self.np

parent fcda4c82
No related branches found
No related tags found
No related merge requests found
...@@ -55,12 +55,14 @@ class PytatoPyOpenCLArrayContext(ArrayContext): ...@@ -55,12 +55,14 @@ class PytatoPyOpenCLArrayContext(ArrayContext):
super().__init__() super().__init__()
self.queue = queue self.queue = queue
self.allocator = allocator self.allocator = allocator
from arraycontext.impl.pytato.fake_numpy import PytatoFakeNumpyNamespace
self.np = PytatoFakeNumpyNamespace(self)
# unused, but necessary to keep the context alive # unused, but necessary to keep the context alive
self.context = self.queue.context self.context = self.queue.context
def _get_fake_numpy_namespace(self):
from arraycontext.impl.pytato.fake_numpy import PytatoFakeNumpyNamespace
return PytatoFakeNumpyNamespace(self)
# {{{ ArrayContext interface # {{{ ArrayContext interface
def clone(self): def clone(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment