-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add option threads
?
#54
Comments
I think it makes sense, although I wouldn't know how to implement it. Are there options built into numpy and scipy that can be used? |
Parallel execution is easy to implement with |
I'd be in favor of adding it. I think it could go after 1.0.0 since it should be fully backwards compatible? |
True! |
One of the first questions I got after the presentation on resample at PyHEP was about parallelization.
In principle, resampling methods are perfectly parallelizable, assuming that
fn
is pure (has no side-effects). That is generally a reasonable assumption. In Python, there are many ways to parallelize, you may want to parallelize on your own cores, or on some cluster of computers, or on the cloud. Therefore, offering direct access toresample
is good, because it allows the user to user to chose their parallelization scheme.For the simple common cases, however, we may want to offer a
threads
option to our methods, which computefn
on the replicas usingthreads
number of threads on the current computer, to better utilize common multi-core processors. This would an option for the functionsbootstrap
andjackknife
and those that build on them, e.g.bias
andvariance
etc. @dsaxton What do you think?The text was updated successfully, but these errors were encountered: