title: Cannot get dimensions of bounds to match in scipy.optimize.fmin_tnc
body: <p>Note: This is not a duplicate of <a href="https://stackoverflow.com/questions/29150064/python-scipy-indexerror-the-length-of-bounds-is-not-compatible-with-that-of-x0">Python SciPy IndexError: the length of bounds is not compatible with that of x0</a> . I believe I'm already following the answer there and beside, it's a different function in that library.</p>
  
  <p>I am calling</p>
  
  <pre><code>fmin_tnc(self._negative_likelihood,
           [(axis_mean + current_prob) / 2],
           fprime=self._likelihood_gradient,
           args=(axis_mean, axis_std, current_prob, self.total),
           bounds=[tuple(sorted([axis_mean, current_prob]))])
  </code></pre>
  
  <p>The two functions are both static functions, with signatures:</p>
  
  <pre><code>(x, axis_mean, axis_std, current_prob, trials)
  </code></pre>
  
  <p>The second unnamed arguments, per the documentation at <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_tnc.html#scipy.optimize.fmin_tnc" rel="nofollow noreferrer">http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_tnc.html#scipy.optimize.fmin_tnc</a> , is:</p>
  
  <pre><code>x0 : array_like
  </code></pre>
  
  <p>I'm only running fmin_tnc on one set of values at a time, so I make x0 a list of len 1.</p>
  
  <p>The documentation for bounds says:</p>
  
  <pre><code>bounds : list, optional
      (min, max) pairs for each element in x0, defining the bounds on that parameter.
  </code></pre>
  
  <p>So I'm passing a list of one sorted tuple, to match the one element of xo. I've tried several other permutations, but I always get:</p>
  
  <pre><code>ValueError: length of x0 != length of bounds 
  </code></pre>
  
  <p>len(bounds) and len(x0) both return 1. What am I doing wrong?</p>