Skip to content
Snippets Groups Projects
Commit e0e1a420 authored by Kaushik Kulkarni's avatar Kaushik Kulkarni Committed by Andreas Klöckner
Browse files

Define ArrayContext.permits_advanced_indexing

parent ac8d9d26
No related branches found
No related tags found
No related merge requests found
Pipeline #212867 passed
...@@ -361,6 +361,14 @@ class ArrayContext(ABC): ...@@ -361,6 +361,14 @@ class ArrayContext(ABC):
def supports_nonscalar_broadcasting(self): def supports_nonscalar_broadcasting(self):
pass pass
@abstractproperty
def permits_advanced_indexing(self):
"""
*True* only if the arrays support :mod:`numpy`'s advanced indexing
semantics.
"""
pass
# }}} # }}}
# vim: foldmethod=marker # vim: foldmethod=marker
...@@ -282,6 +282,10 @@ class PyOpenCLArrayContext(ArrayContext): ...@@ -282,6 +282,10 @@ class PyOpenCLArrayContext(ArrayContext):
def supports_nonscalar_broadcasting(self): def supports_nonscalar_broadcasting(self):
return False return False
@property
def permits_advanced_indexing(self):
return False
# }}} # }}}
# vim: foldmethod=marker # vim: foldmethod=marker
...@@ -231,3 +231,7 @@ class PytatoPyOpenCLArrayContext(ArrayContext): ...@@ -231,3 +231,7 @@ class PytatoPyOpenCLArrayContext(ArrayContext):
@property @property
def supports_nonscalar_broadcasting(self): def supports_nonscalar_broadcasting(self):
return True return True
@property
def permits_advanced_indexing(self):
return True
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