Skip to content

Instantly share code, notes, and snippets.

View renegarcia's full-sized avatar

Rene Garcia renegarcia

View GitHub Profile
@renegarcia
renegarcia / test_ode_solver_sympy.py
Created February 5, 2018 17:49
How to test the solution to an ordinary differential equation found with sympy.
'''
How to test a ODE in sympy properly.
See [http://docs.sympy.org/latest/modules/solvers/ode.html#checkodesol] for more
'''
import sympy as sp
x, h = sp.symbols('x h')
eq = sp.diff(h(x), x) - h(x)
sols = sp.dsolve(eq)
sol = sols.rhs
@renegarcia
renegarcia / test.py
Last active August 29, 2015 14:19 — forked from href/test.py
import inspect
import morepath
import os
from webob import static
class App(morepath.App):
@property