[SciPy-Dev] General discussion on parallelisation

Andrew Nelson andyfaff at gmail.com
Tue Jan 9 19:01:05 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
>
> As for the map problem I don't know, but it's probably worth asking the
`joblib` people if there is a suitable solution or workaround.

In the scheme of things I'd prefer to retain the use of `__next__`, see
https://github.com/scipy/scipy/pull/6923 for the direction of where I think
things are headed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180110/755a8a29/attachment.html>


More information about the SciPy-Dev mailing list