I'm experimenting with interpolate.interp1d but there is some strange behaviour with it. Here's the script:
x = np.linspace(0, 10, 10)
y = np.cos(-x**2/9.0)
f = interp1d(x, y, kind='cubic')
plt.figure(figsize=(10,7))
plt.plot(x, y, 'o', x, f(x), '--')
plt.legend(['data', 'interp'], loc='best')
plt.show()
plt.pause(2**31-1)
But the result I'm getting is like I'm passing kind='linear'. In fact, no matter the parameter 'kind', the result is the same. Am I missing something?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.