Parallel mapping functions in IPython w/ multiple parameters

后端 未结 5 911
闹比i
闹比i 2021-01-30 21:05

I\'m trying to use IPython\'s parallel environment and so far, it\'s looking great but I\'m running into a problem. Lets say that I have a function, defined in a library

<
5条回答
  •  一个人的身影
    2021-01-30 21:45

    I am posting Alex S. comment as answer. This probably is right approach for this problem:

    Just do partial application with a lambda. I know it looks weird, but using my_f = lambda a,my=other,arguments=go,right=here : f(a,my,arguments,right) is the simplest way to go about it without falling into pickling and pushing problems.

提交回复
热议问题