def jacobian(t, y, p): jac = self.jac # note that the evaluated code sets jac as a side effect if Solver._use_inline: weave_inline(jac_eqs, ['jac', 't', 'y', 'p']); else: _exec(jac_eqs_py, locals()) return jac
def rhs(t, y, p): ydot = self.ydot # note that the evaluated code sets ydot as a side effect if Solver._use_inline: weave_inline(code_eqs, ['ydot', 't', 'y', 'p']); else: _exec(code_eqs_py, locals()) return ydot
def jacobian(t, y, p): jac = self.jac # note that the evaluated code sets jac as a side effect if Solver._use_inline: weave_inline(jac_eqs, ['jac', 't', 'y', 'p']) else: _exec(jac_eqs_py, locals()) return jac
def rhs(t, y, p): ydot = self.ydot # note that the evaluated code sets ydot as a side effect if Solver._use_inline: weave_inline(code_eqs, ['ydot', 't', 'y', 'p']) else: _exec(code_eqs_py, locals()) return ydot
def _test_inline(): """Detect whether scipy.weave.inline is functional.""" if not hasattr(Solver, '_use_inline'): Solver._use_inline = False try: if weave_inline is not None: weave_inline('int i=0; i=i;', force=1) Solver._use_inline = True except (scipy.weave.build_tools.CompileError, distutils.errors.CompileError, ImportError): pass