python中导入numpy库,在并行Python中导入NumPy

在尝试使用PP(Parallel Python)并行提交一个依赖于NumPy的函数时,遇到了找不到共享对象multiarray.so的错误。错误发生在尝试从NumPy源目录导入时。解决方案可能是错误地提供了依赖函数,正确做法是将依赖函数和模块作为字符串传递给submit函数,如:job = job_server.submit(aa.plotwavefunc, depfuncs = (band,k), modules = ("numpy","pylab","signal"))。" 106264775,7356534,Vue Router 3.1.6 重复跳转报错解决方案,"['前端', 'vue', 'vue-router']
摘要由CSDN通过智能技术生成

everyone,I am new to PP but got stuck in a problem when importing NumPy with PP.

Basically what I tried to do was submitting a function to the ppserver which depends on NumPy. I have imported it at the very beginning of the code using (import NumPy as nu) but when I ran the code, it gave me the error that cannot find the shared object multiarray.so.

The situation is exactly the same here: parallel python forum

the code is attached as below: (I am running on python 2.7.2 + pp 1.6.0 + numpy 1.5.1)

import numpy as nu

import pylab as pl

import pp

job_server = pp.Server(secret="123456")

print "Starting pp with", job_server.get_ncpus(), "workers"

aa = GrRib()

job = job_server.submit(aa.plotwavefunc, (band,k),(nu,pl,signal))

result = job()

the error looks

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值