docs: def insured_loss_curve(curve, deductible, insured_limit):
      """
      Compute an insured loss ratio curve given a loss ratio curve
  
      :param curve: an array 2 x R (where R is the curve resolution)
      :param float deductible: the deductible limit in fraction form
      :param float insured_limit: the insured limit in fraction form
  
      >>> losses = numpy.array([3, 20, 101])
      >>> poes = numpy.array([0.9, 0.5, 0.1])
      >>> insured_loss_curve(numpy.array([losses, poes]), 5, 100)
      array([[ 3.        , 20.        ],
             [ 0.85294118,  0.5       ]])
      """
      losses, poes = curve[:, curve[0] <= insured_limit]
      limit_poe = interpolate.interp1d(
          *curve, bounds_error=False, fill_value=1)(deductible)
      return numpy.array([
          losses,
          numpy.piecewise(poes, [poes > limit_poe], [limit_poe, lambda x: x])])