---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-0371f834cf64> in <module>()
----> 1 get_ipython().run_cell_magic(u'prun', u'', u'#cigen = counterflow_integrator(gen2,genhot, False)\ncigen = counterflow_integrator(gen3,genhot, True)')
C:\Python27\lib\site-packages\IPython\core\interactiveshell.pyc in run_cell_magic(self, magic_name, line, cell)
2160 magic_arg_s = self.var_expand(line, stack_depth)
2161 with self.builtin_trap:
-> 2162 result = fn(magic_arg_s, cell)
2163 return result
2164
C:\Python27\lib\site-packages\IPython\core\magics\execution.pyc in prun(self, parameter_s, cell)
C:\Python27\lib\site-packages\IPython\core\magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
C:\Python27\lib\site-packages\IPython\core\magics\execution.pyc in prun(self, parameter_s, cell)
251 arg_str += '\n' + cell
252 arg_str = self.shell.input_splitter.transform_cell(arg_str)
--> 253 return self._run_with_profiler(arg_str, opts, self.shell.user_ns)
254
255 def _run_with_profiler(self, code, opts, namespace):
C:\Python27\lib\site-packages\IPython\core\magics\execution.pyc in _run_with_profiler(self, code, opts, namespace)
273 prof = profile.Profile()
274 try:
--> 275 prof = prof.runctx(code, namespace, namespace)
276 sys_exit = ''
277 except SystemExit:
C:\Python27\lib\cProfile.pyc in runctx(self, cmd, globals, locals)
138 self.enable()
139 try:
--> 140 exec cmd in globals, locals
141 finally:
142 self.disable()
<string> in <module>()
C:\Users\nfette\Documents\GitHub\openACHP\src\HRHX_integral_model.pyc in __init__(self, cold, hot, useHotT)
63 self.hot = hot
64 self.useHotT = useHotT
---> 65 self.calcQmax()
66 def calcUA(self,Q):
67 func = lambda(q):1./(self.hot.T(Q-q)-self.cold.T(q))
C:\Users\nfette\Documents\GitHub\openACHP\src\HRHX_integral_model.pyc in calcQmax(self, extra, brute)
89 "jac":lambda(Q):-1}]
90 if brute:
---> 91 opt = scipy.optimize.differential_evolution(func,[(0,qc)])
92 print opt
93 else:
C:\Python27\lib\site-packages\scipy\optimize\_differentialevolution.pyc in differential_evolution(func, bounds, args, strategy, maxiter, popsize, tol, mutation, recombination, seed, callback, disp, polish, init)
199 callback=callback,
200 disp=disp,
--> 201 init=init)
202 return solver.solve()
203
C:\Python27\lib\site-packages\scipy\optimize\_differentialevolution.pyc in __init__(self, func, bounds, args, strategy, maxiter, popsize, tol, mutation, recombination, seed, maxfun, callback, disp, polish, init)
350 if (np.size(self.limits, 0) != 2
351 or not np.all(np.isfinite(self.limits))):
--> 352 raise ValueError('bounds should be a sequence containing '
353 'real valued (min, max) pairs for each value'
354 ' in x')
ValueError: bounds should be a sequence containing real valued (min, max) pairs for each value in x