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
4b184f88
Commit
4b184f88
authored
3 years ago
by
Matt Smith
Committed by
Andreas Klöckner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
require reduce_func to be associative in non-recursive reductions too
Co-authored-by:
Alex Fikl
<
alexfikl@gmail.com
>
parent
5776eab5
No related branches found
No related tags found
No related merge requests found
Pipeline
#206063
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arraycontext/container/traversal.py
+4
-2
4 additions, 2 deletions
arraycontext/container/traversal.py
with
4 additions
and
2 deletions
arraycontext/container/traversal.py
+
4
−
2
View file @
4b184f88
...
...
@@ -303,7 +303,8 @@ def map_reduce_array_container(
"""
Perform a map-reduce over array containers.
:param reduce_func: callable used to reduce over the components of *ary*
if *ary* is an :class:`~arraycontext.ArrayContainer`.
if *ary* is an :class:`~arraycontext.ArrayContainer`. The callable
should be associative, as for :func:`rec_map_reduce_array_container`.
:param map_func: callable used to map a single array of type
:class:`arraycontext.ArrayContext.array_types`. Returns an array of the
same type or a scalar.
...
...
@@ -323,7 +324,8 @@ def multimap_reduce_array_container(
r
"""
Perform a map-reduce over multiple array containers.
:param reduce_func: callable used to reduce over the components of any
:class:`~arraycontext.ArrayContainer`\ s in *\*args*.
:class:`~arraycontext.ArrayContainer`\ s in *\*args*. The callable
should be associative, as for :func:`rec_map_reduce_array_container`.
:param map_func: callable used to map a single array of type
:class:`arraycontext.ArrayContext.array_types`. Returns an array of the
same type or a scalar.
...
...
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