code: def re_size_array(x_in, y_in, input_values, x_out, y_out):
      
      interp_2d = scipy.interpolate.interp2d(x_in, y_in, input_values, kind='linear')
      #interp_2d = scipy.interpolate.RectBivariateSpline(x_in, y_in, input_values, kx=1, ky=1)
      out_values = interp_2d.__call__(x_out, y_out)
      return out_values
docs: resizes 2d array (i.e. image) to new coordinates. So far only works with square output aligned with coordinate axis.
      :param x_in:
      :param y_in:
      :param input_values:
      :param x_out:
      :param y_out:
      :return: