Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable reducer in ensemble functions #17

Open
kaizu opened this issue Jun 27, 2018 · 0 comments
Open

Enable reducer in ensemble functions #17

kaizu opened this issue Jun 27, 2018 · 0 comments
Milestone

Comments

@kaizu
Copy link
Member

kaizu commented Jun 27, 2018

jobs = ((1, 'spam'), (2, 'ham'), (3, 'eggs'))
target = lambda args, job_id, task_id: (args[1] * args[0])
run_serial(target, jobs)  # => [['spam'], ['hamham'], ['eggseggseggs']]
reducer = lambda x, y: x + len(y)
run_serial(target, jobs, reducer=reducer, initializer=0)  # => [22]
@kaizu kaizu transferred this issue from ecell/ecell4_base Feb 15, 2019
@kaizu kaizu added this to the nice to have milestone Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant