x = [1,2,4,7,11]
x0 = x[:-1] # x0 = [1,2,4,7]
x1 = x[1:]
python求数组中前后元素的差(微分操作)的一种方法
最新推荐文章于 2023-10-25 15:00:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
x = [1,2,4,7,11]
x0 = x[:-1] # x0 = [1,2,4,7]
x1 = x[1:]