docs: def line_intersection_2D(abarg, cdarg):
      '''
      line_intersection((a, b), (c, d)) yields the intersection point between the lines that pass
      through the given pairs of points. If any lines are parallel, (numpy.nan, numpy.nan) is
      returned; note that a, b, c, and d can all be 2 x n matrices of x and y coordinate row-vectors.
      '''
      ((x1,y1),(x2,y2)) = abarg
      ((x3,y3),(x4,y4)) = cdarg
      dx12 = (x1 - x2)
      dx34 = (x3 - x4)
      dy12 = (y1 - y2)
      dy34 = (y3 - y4)
      denom = dx12*dy34 - dy12*dx34
      unit = np.isclose(denom, 0)
      if unit is True: return (np.nan, np.nan)
      denom = unit + denom
      q12 = (x1*y2 - y1*x2) / denom
      q34 = (x3*y4 - y3*x4) / denom
      xi = q12*dx34 - q34*dx12
      yi = q12*dy34 - q34*dy12
      if   unit is False: return (xi, yi)
      elif unit is True:  return (np.nan, np.nan)
      else:
          xi = np.asarray(xi)
          yi = np.asarray(yi)
          xi[unit] = np.nan
          yi[unit] = np.nan
          return (xi, yi)