Did I find the right examples for you? yes no

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

src/p/y/pydy-tutorial-pycon-2014-HEAD/notebooks/solution/simulation.py   pydy-tutorial-pycon-2014(Download)
#!/usr/bin/env python
 
from pydy_code_gen.code import generate_ode_function
from numpy import array, linspace, deg2rad, ones, concatenate
from scipy.integrate import odeint
# =====================
 
right_hand_side = generate_ode_function(mass_matrix, forcing_vector,
                                        constants, coordinates, speeds,
                                        specified)

src/p/y/pydy-code-gen-0.1.0/bin/benchmark_pydy_code_gen.py   pydy-code-gen(Download)
from numpy import hstack, ones, pi, linspace, array, zeros, zeros_like
import matplotlib.pyplot as plt
from pydy_code_gen.code import generate_ode_function
from pydy_code_gen.tests.models import \
    generate_n_link_pendulum_on_cart_equations_of_motion
            print('-' * len(subtitle))
            start = time.time()
            evaluate_ode = generate_ode_function(*results,
                                                      generator=method)
            code_generation_times[j, k] = time.time() - start

src/p/y/pydy-code-gen-0.1.0/pydy_code_gen/tests/test_code.py   pydy-code-gen(Download)
 
# local libraries
from pydy_code_gen.code import generate_ode_function
from models import generate_mass_spring_damper_equations_of_motion
 
 
        for backend in backends:
            rhs = generate_ode_function(mass_matrix, forcing_vector,
                                        constants, coordinates, speeds,
                                        specified, generator=backend)
 
        for backend in backends:
            rhs = generate_ode_function(mass_matrix, forcing_vector,
                                        constants, coordinates, speeds,
                                        specified, generator=backend)
 
        for backend in backends:
            rhs = generate_ode_function(mass_matrix, forcing_vector,
                                        constants, coordinates, speeds,
                                        specified, generator=backend)

src/p/y/pydy-code-gen-0.1.0/pydy_code_gen/tests/whipple.py   pydy-code-gen(Download)
# Try with lambdify
 
from pydy_code_gen.code import generate_ode_function
parameters = constant_substitutions.keys()
parameters.sort()
print('Generating a numeric right hand side function.')
rhs = generate_ode_function(kane, parameters, specified=[T4, T6, T7],