code: def _lmder1_linear_r1zcr(n, m, factor, target_fnorm1, target_fnorm2, target_params):
      
  
      def func(params, vec):
          s = 0
          for j in range(1, n - 1):
              s += (j + 1) * params[j]
          for i in range(m):
              vec[i] = i * s - 1
          vec[m-1] = -1
  
      def jac(params, jac):
          jac.fill(0)
  
          for i in range(1, n - 1):
              for j in range(1, m - 1):
                  jac[i,j] = j * (i + 1)
  
      guess = np.ones(n) * factor
  
      #_lmder1_test(m, func, jac, guess)
      _lmder1_driver(m, func, jac, guess,
                     target_fnorm1, target_fnorm2, None)
docs: A rank-1 linear function with zero columns and rows (lmder test #3)