title: TypeError: <lambda>() missing 2 required positional arguments: 'lnS' and 'T'
body: <p>TypeError: () missing 2 required positional arguments: 'lnS' and 'T'</p>
  
  <p>I tried to declare the variables 'lnS' and 'T' in different places.</p>
  
  <p>The below is the code:</p>
  
  <pre><code>    def minimize(param):
  
          CF=lambda u, lnS, T:\
          cf_log_cgmy(u=u, lnS=lnS, T=Tmt, mu=r, half_etasq=param[4],\
                      C=param[0], G=param[1], M=param[2], Y=param[3])
          Call_price_CM_CF(CF, lnS)
  
          sum = 0
          for i in range(0,len(prices_oom)):
              a = Call_price_CF_K(np.log(strike_oom[i])) - prices_oom[i]
              sum = sum+a*a
          return sum
  
  
  
  
  </code></pre>
  
  <p>While the error is: </p>
  
  <pre><code>
  TypeError: &lt;lambda&gt;() missing 2 required positional arguments: 'lnS' and 'T'
  
  
  
  </code></pre>