import numpy as np from scipy.interpolate import griddata np.set_printoptions(precision=2, suppress=True) points = np.array([ [0.0, 0.0], [2.0, 0.0], [0.0, 2.0], [2.0, 2.0], [0.8, 0.6], [1.5, 1.2], ]) values = 3 * points[:, 0] - 2 * points[:, 1] + 4