Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TypeError Traceback (most recent call last)
- /usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
- 176 else:
- 177 filename = fname
- --> 178 __builtin__.execfile(filename, *where)
- /home/ted/quality-provision.py in <module>()
- 83
- 84 x0=[.1,.1]
- ---> 85 result=fmin_l_bfgs_b(W,x0,bounds=[(.1,1),(.1,1)])
- /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)
- 172
- 173 res = _minimize_lbfgsb(fun, x0, args=args, jac=jac, bounds=bounds,
- --> 174 **opts)
- 175 d = {'grad': res['jac'],
- 176 'task': res['message'],
- /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)
- 292 n_function_evals += 1
- 293 # Overwrite f and g:
- --> 294 f, g = func_and_grad(x)
- 295 elif task_str.startswith(asbytes('NEW_X')):
- 296 # new iteration
- /usr/lib/python2.7/site-packages/scipy/optimize/lbfgsb.pyc in func_and_grad(x)
- 247 else:
- 248 def func_and_grad(x):
- --> 249 f = fun(x, *args)
- 250 g = jac(x, *args)
- 251 return f, g
- /usr/lib/python2.7/site-packages/scipy/optimize/optimize.pyc in __call__(self, x, *args)
- 53 self.x = numpy.asarray(x).copy()
- 54 fg = self.fun(x, *args)
- ---> 55 self.jac = fg[1]
- 56 return fg[0]
- 57
- TypeError: 'float' object has no attribute '__getitem__'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement