@@ -35,22 +35,20 @@ def zoom(array, newSize, order=3):
35
35
#If array is complex must do 2 interpolations
36
36
if array .dtype == numpy .complex64 or array .dtype == numpy .complex128 :
37
37
38
- realInterpObj = interp2d ( numpy .arange (array .shape [0 ]),
39
- numpy .arange (array .shape [1 ]), array .real , copy = False ,
40
- kind = INTERP_KIND [order ])
41
- imagInterpObj = interp2d ( numpy .arange (array .shape [0 ]),
42
- numpy .arange (array .shape [1 ]), array .imag , copy = False ,
43
- kind = INTERP_KIND [order ])
38
+ realInterpObj = RectBivariateSpline ( numpy .arange (array .shape [0 ]),
39
+ numpy .arange (array .shape [1 ]), array .real , kx = order , ky = order )
40
+ imagInterpObj = RectBivariateSpline ( numpy .arange (array .shape [0 ]),
41
+ numpy .arange (array .shape [1 ]), array .imag ,
42
+ kx = order , ky = order )
44
43
return (realInterpObj (coordsY ,coordsX )
45
44
+ 1j * imagInterpObj (coordsY ,coordsX ))
46
45
47
46
48
47
49
48
else :
50
49
51
- interpObj = interp2d ( numpy .arange (array .shape [0 ]),
52
- numpy .arange (array .shape [1 ]), array , copy = False ,
53
- kind = INTERP_KIND [order ])
50
+ interpObj = RectBivariateSpline ( numpy .arange (array .shape [0 ]),
51
+ numpy .arange (array .shape [1 ]), array , kx = order , ky = order )
54
52
55
53
#return numpy.flipud(numpy.rot90(interpObj(coordsY,coordsX)))
56
54
return interpObj (coordsY ,coordsX )
0 commit comments