import numpy as np
from scipy.interpolate import CubicSpline# 已知的数据点
known_points = [(1, 384423), (61,415097),(121,470247),(541,491876),(601,428462)]# 提取已知数据点的x和y值
x_known, y_known = zip(*known_points)# 生成所有数据点的x值
x_all = list(range(0,known_points[-1][0]))# 创建CubicSpline对象并进行插值
cs = CubicSpline(x_known, y_known)# 计算所有数据点的y值
y_all = cs(x_all)# 打印生成的中间数据点
for index, value in enumerate(reversed(y_all)):print(int(value))