I would like to do a 3D interpolation of my 3D matrix. I've managed to do it on Matlab using interpn
however it would be much better if I could do it on Python since it could be executed on any machine without the need of having Matlab installed. My Matlab script looks like:
X = (-246.4529 :2.5: -246.4529 + 100*2.5 - 1);
Y = -45.6577 :2.5: -45.6577 + 213*2.5 - 1;
Z = -211.00 :2.5: -211.00 + 140*2.5 - 1;
Xp = -255.21 :5: -255.21 + 50*5 - 1;
Yp = -50.66 :5: -50.66 + 108*5 - 1;
Zp = -215.00 :5: -215.00 + 86*5 - 1;
[XX, YY, ZZ] = ndgrid(X, Y, Z);
[XXp, YYp, ZZp] = ndgrid(Xp, Yp, Zp);
Vq = interpn(XX,YY,ZZ, double(matrix), XXp,YYp,ZZp);
Any ideas of how I could do the same on Python? Is there a 3D interpolation package?