Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/d/a/dana-0.5.0/dana/tests/diff_equation.py   dana(Download)
        y, t,dt = 1.0, 1.0,  0.00001
        for i in range(int(t/dt)):
            y = eq.evaluate(y, dt)
        assert abs(y-np.exp(1)) < 0.0001
 
        y, t,dt = 1.0, 1.0,  0.01
        for i in range(int(t/dt)):
            y = eq.evaluate(y, dt)
        assert abs(y-np.exp(1)) < 0.0001
 
        y, t,dt = 1.0, 1.0,  0.001
        for i in range(int(t/dt)):
            y = eq.evaluate(y, dt)
        assert abs(y-np.exp(1)) < 0.0001
 
        y, t,dt = 1.0, 1.0,  0.01
        for i in range(int(t/dt)):
            y = eq.evaluate(y, dt)
        assert abs(y-np.exp(1)) < 0.0001