2017-02-13 94 views
0

我想使用scipy.interpolate中的“rbf”函数,而不安装scipy和cython。首先,我试图只导入rbf函数的源代码。但是Rbf本身想要导入其他函数.pxd-files其中使用了cython,它也没有安装在运行python脚本的maschine上。有没有办法在不编译scipy的情况下使用2dinterpolation rbf? 非常感谢提前有没有办法在不编译的情况下使用scipy.interpolate rbf函数?

+0

不,没有很好的方法(它也需要Fortran)。考虑解决安装问题! – sascha

+0

看看[pyinstaller](http://www.pyinstaller.org/) –

回答

2

假设您无法为您的平台获得scipy轮,也无法使用例如蟒蛇,你当然可以只取https://github.com/scipy/scipy/blob/v0.18.1/scipy/interpolate/rbf.py#L57-L240 并尝试使用代码独立。将有两个问题需要解决:

  • scipy.special.xlogy。这只是x*log(y),特别注意的是 它对于x = 0等于零。如果需要,可以轻松地以纯Python或numpy进行复制。

  • scipy.linalg.solve。如果你有numpy,你可以用numpy.linalg.solve替换它。如果你没有暴躁,那么,你有问题。

相关问题