code: def get_min_distance(element):
      
      try:
          from scipy.spatial.distance import pdist
          return pdist(element.array([0, 1])).min()
      except:
          return _get_min_distance_numpy(element)
docs: Gets the minimum sampling distance of the x- and y-coordinates
      in a grid.