简体   繁体   English

无法在Scipy中使用Rbf插入数据

[英]Cannot interpolate data using Rbf in Scipy

I was trying to interpolate data using Rbf. 我试图使用Rbf插入数据。 The output data that I need is actually a single value. 我需要的输出数据实际上是单个值。 So I used something like 所以我使用了类似的东西

x=numpy.array([100])
y=numpy.array([200])
d=numpy.array([300])
rbfi=scipy.interpolate.Rbf(x,y,d)

But there was an error: 但是有一个错误:

ValueError: array must not contain infs or NaNs

Does anybody know how to solve this problem? 有人知道如何解决这个问题吗? Thanks a lot! 非常感谢!

Quite outdated but in case anyone wonders: 相当过时,但万一有人想知道:

Rbf requires at least 2 data points. Rbf至少需要2个数据点。

x=numpy.array([100,120])
y=numpy.array([200,220])
d=numpy.array([300,100])
rbfi=scipy.interpolate.Rbf(x,y,d)

>>> print(rbfi)
<scipy.interpolate.rbf.Rbf object at 0x7fdac142b240>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM