title: Scipy Minimize - Unable to minimize objective function
body: <p>I am trying to optimise a function to find max value of <code>rev_tot</code> using scipy minimise. Here <code>obj_data</code> is a list of probabilities, <code>prem</code> is a constant and <code>inc</code> can take any real value. Following is the code I have written for the objective function :</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import scipy
  from scipy.optimize import minimize
  
  def objective(x,*args):
  
      prem = args[0]
      prob = args[1]
      inc = x[0]
  
  
      rev_tot = 0
      rev = 0
      del_p = 0.2*(1-np.exp(-2*(1-np.exp(-inc/400))))
      for i in range(len(prob)):
          rev = (prob[i]*(1+del_p)*prem) - inc
          rev_tot = rev_tot + rev
      return 1/rev_tot
  
  
  prem = 3300
  par = [0.9,0.1,0.5,0.4]
  x0 = np.array([3]) # initial guess
  solve = minimize(objective,x0,args=(prem,par),method='SLSQP')
  solve.x
  </code></pre>
  
  <p>I want to find the <code>inc</code> value which will minimize <code>1/rev_tot</code>(and thus maximising <code>rev_tot</code>. 
  When I call:</p>
  
  <pre><code>minimize(objective,x0,args=(prem,par),method='SLSQP')
  </code></pre>
  
  <p>the function runs, but <code>solve.x</code> shows no change in initial value. I am unable to figure out why the minimisation is not happening.</p>