code: def get_axes(x, y):
      
      n=int(np.sqrt(len(x)))
      if n**2 != len(x):
          raise ValueError("lenght of input array given as %s is not square of integer number!" % (len(x)))
      x_image = x.reshape(n,n)
      y_image = y.reshape(n,n)
      x_axes = x_image[0,:]
      y_axes = y_image[:,0]
      return x_axes, y_axes
docs: computes the axis x and y of a given 2d grid
      :param x:
      :param y:
      :return: