a = np.array([[1, 2], [2, 3]])
interObj = interpolate.interp2d([0, 2], [0, 2], a)
rst = interObj(range(3), range(3))
print(a)
print(rst)
[[1 2]
[2 3]]
[[1. 1.5 2. ]
[1.5 2. 2.5]
[2. 2.5 3. ]]
a = np.array([[1, 2], [2, 3]])
interObj = interpolate.interp2d([0, 2], [0, 2], a)
rst = interObj(range(3), range(3))
print(a)
print(rst)
[[1 2]
[2 3]]
[[1. 1.5 2. ]
[1.5 2. 2.5]
[2. 2.5 3. ]]