【发布时间】:2016-11-30 05:11:12
【问题描述】:
运行此代码时,出现此错误:
from ipyparallel import error, AsyncHubResult, DirectView as dv, Reference
@dv.parallel(block=True)
def np_std_par(x):
return np_std(x)
TypeError: unbound method parallel() must be called with
DirectView instance as first argument (got nothing instead)
如何使用装饰器? 听起来不清楚。
【问题讨论】: