SHARE
TWEET

Untitled

a guest Aug 22nd, 2012 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TypeError                                 Traceback (most recent call last)
  2. /usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
  3.     176             else:
  4.     177                 filename = fname
  5. --> 178             __builtin__.execfile(filename, *where)
  6.  
  7. /home/ted/quality-provision.py in <module>()
  8.      83
  9.      84 x0=[.1,.1]
  10. ---> 85 result=fmin_l_bfgs_b(W,x0,bounds=[(.1,1),(.1,1)])
  11.  
  12. /usr/lib/python2.7/site-packages/scipy/optimize/lbfgsb.pyc in fmin_l_bfgs_b(func, x0, fprime, args, approx_grad, bounds, m, factr, pgtol, epsilon, iprint, maxfun, disp)
  13.     172
  14.     173     res = _minimize_lbfgsb(fun, x0, args=args, jac=jac, bounds=bounds,
  15. --> 174                            **opts)
  16.     175     d = {'grad': res['jac'],
  17.     176          'task': res['message'],
  18.  
  19. /usr/lib/python2.7/site-packages/scipy/optimize/lbfgsb.pyc in _minimize_lbfgsb(fun, x0, args, jac, bounds, disp, maxcor, ftol, gtol, eps, maxiter, iprint, **unknown_options)
  20.     292             n_function_evals += 1
  21.     293             # Overwrite f and g:
  22. --> 294             f, g = func_and_grad(x)
  23.     295         elif task_str.startswith(asbytes('NEW_X')):
  24.     296             # new iteration
  25.  
  26. /usr/lib/python2.7/site-packages/scipy/optimize/lbfgsb.pyc in func_and_grad(x)
  27.     247     else:
  28.     248         def func_and_grad(x):
  29. --> 249             f = fun(x, *args)
  30.     250             g = jac(x, *args)
  31.     251             return f, g
  32.  
  33. /usr/lib/python2.7/site-packages/scipy/optimize/optimize.pyc in __call__(self, x, *args)
  34.      53         self.x = numpy.asarray(x).copy()
  35.      54         fg = self.fun(x, *args)
  36. ---> 55         self.jac = fg[1]
  37.      56         return fg[0]
  38.      57
  39.  
  40. TypeError: 'float' object has no attribute '__getitem__'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top