def run(): m_la, std_la = 10., 1.0 m_xi, std_xi = 1.0, 0.1 # discretize the control variable (x-axis) e_arr = np.linspace(0, 2.0, 80) #=========================================================================== # Randomization #=========================================================================== s = SPIRRID(q = fiber_tt_2p(), e_arr = e_arr, n_int = 10, theta_vars = dict(la = RV('norm', m_la, std_la), xi = m_xi, #RV('norm', m_xi, std_xi) ), sampling_type = 'TGrid', codegen_type = 'numpy', ) p.plot(e_arr, s.mu_q_arr, 'b-x') s.codegen_type = 'weave' p.plot(e_arr, s.mu_q_arr, 'r-') p.show()
def run(): m_la, std_la = 10., 1.0 m_xi, std_xi = 1.0, 0.1 # discretize the control variable (x-axis) e_arr = np.linspace(0, 2.0, 80) #=========================================================================== # Randomization #=========================================================================== s = SPIRRID( q=fiber_tt_2p(), e_arr=e_arr, n_int=10, theta_vars=dict( la=m_la, #la = RV('norm', m_la, std_la), #xi = m_xi, xi=RV('norm', m_xi, std_xi)), sampling_type='MCS', codegen_type='numpy', ) p.plot(e_arr, s.mu_q_arr, 'b-x') s.codegen_type = 'weave' p.plot(e_arr, s.mu_q_arr, 'r-') p.show()