docs: def point_to_polygon_distance(polygon, pxx, pyy):
      """
      Calculate the distance to polygon for each point of the collection
      on the 2d Cartesian plane.
  
      :param polygon:
          Shapely "Polygon" geometry object.
      :param pxx:
          List or numpy array of abscissae values of points to calculate
          the distance from.
      :param pyy:
          Same structure as ``pxx``, but with ordinate values.
      :returns:
          Numpy array of distances in units of coordinate system. Points
          that lie inside the polygon have zero distance.
      """
      pxx = numpy.array(pxx)
      pyy = numpy.array(pyy)
      assert pxx.shape == pyy.shape
      if pxx.ndim == 0:
          pxx = pxx.reshape((1, ))
          pyy = pyy.reshape((1, ))
      result = numpy.array([
          polygon.distance(shapely.geometry.Point(pxx.item(i), pyy.item(i)))
          for i in range(pxx.size)
      ])
      return result.reshape(pxx.shape)