[SciPy-Dev] General discussion on parallelisation

Andrew Nelson andyfaff at gmail.com
Mon Jan 8 23:22:17 EST 2018


>
> On 9 January 2018 at 13:48, Eric Larson <larson.eric.d at gmail.com> wrote:
> > If you can use `__iter__` instead of `__next__` in your
> DifferentialEvolutionSolver class I think you can avoid this problem with
> something along the lines of:
> >
> > class DifferentialEvolutionSolver(object):
> >     ...
> >     def __iter__(self):
> >         with Parallel(...) ...:
> >             for it in ...:
> >                 yield it
>

That seems Pythonic, I'll look into that in more detail. One hurdle might
be when the two approaches are mixed, starting off with a generator, uses
the solver method, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180109/674579e0/attachment.html>


More information about the SciPy-Dev mailing list