Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraycontext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
arraycontext
Commits
e0e1a420
Commit
e0e1a420
authored
3 years ago
by
Kaushik Kulkarni
Committed by
Andreas Klöckner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Define ArrayContext.permits_advanced_indexing
parent
ac8d9d26
No related branches found
No related tags found
No related merge requests found
Pipeline
#212867
passed
3 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arraycontext/context.py
+8
-0
8 additions, 0 deletions
arraycontext/context.py
arraycontext/impl/pyopencl/__init__.py
+4
-0
4 additions, 0 deletions
arraycontext/impl/pyopencl/__init__.py
arraycontext/impl/pytato/__init__.py
+4
-0
4 additions, 0 deletions
arraycontext/impl/pytato/__init__.py
with
16 additions
and
0 deletions
arraycontext/context.py
+
8
−
0
View file @
e0e1a420
...
@@ -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
This diff is collapsed.
Click to expand it.
arraycontext/impl/pyopencl/__init__.py
+
4
−
0
View file @
e0e1a420
...
@@ -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
This diff is collapsed.
Click to expand it.
arraycontext/impl/pytato/__init__.py
+
4
−
0
View file @
e0e1a420
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment