numpy中具有导数的三次插值
最近移民到Python和使用Python进行科学计算的人.这个问题是为了避免可能已经存在的任何代码重复.
A recent immigrant to Python and scientific computing with Python. This is a question to avoid any duplication of code that might already exist.
我有一个字段,该字段在常规网格中作为x和y的函数进行采样.我想对数据进行插值,以便不仅获得网格上任何点的字段值,而且还获得一阶和二阶导数.如果我使用interp2d进行双三次插值,则可以获得该字段的值.
I have a field that is sampled as a function of x and y in a regular grid. I would want to interpolate the data to obtain not only the value of the field at any point on the grid, but also the first and second derivatives. If I interpolate it with bicubic interpolation using interp2d, I can obtain the value of the field.
有人对如何使用现有的numpy或scipy函数获取该字段的一阶和二阶导数有任何建议吗?
Does anyone have a suggestion on how to obtain the first and second derivatives of the field using an EXISTING numpy or scipy function?
谢谢!