Beispiel #1
1
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()
Beispiel #2
0
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()
Beispiel #3
0
def demo():

    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(),
        sampling_type='TGrid',
        codegen_type='weave',
        e_arr=e_arr,
        n_int=10,
        theta_vars=dict(la=RV('norm', m_la, std_la),
                        xi=RV('norm', m_xi, std_xi)),
    )

    #print current configuration of the integrator
    #print s.__str__()

    # print code of the weave (or cython) implementation
    print s.codegen.code
Beispiel #4
0
    def test_e_arr(self):
        '''Check the convenience constructor for eps_vars
        '''
        #===========================================================================
        # Control variable
        #===========================================================================
        e_arr = np.linspace(0, 0.012, 2)

        m_la, std_la = 10., 1.0
        m_xi, std_xi = 1.0, 0.1

        #===========================================================================
        # Randomization
        #===========================================================================

        s = SPIRRID(q = fiber_tt_2p(),
                         e_arr = e_arr,
                         codegen_type = 'numpy',
                         n_int = 10,
                         theta_vars = dict(la = m_la,
                                      xi = m_xi
                                      ),
                         )

        max_mu_q = np.max(s.mu_q_arr)
        self.assertAlmostEqual(max_mu_q, 0.12000000000000001, 10)
    def _redraw(self):

        s = SPIRRID(q=self.rf,
                    sampling_type='LHS',
                    e_arr=self.e_arr,
                    n_int=self.n_G_ipts,
                    theta_vars=dict(tau_fr=2.6,
                                      l=0.0,
                                      d=25.5e-3,
                                      E_mod=72.0e3,
                                      theta=0.0,
                                      xi=0.0179,
                                      phi=1.,
                                      L=30.0
                                 ),
                    # codegen_type='weave'
                )
        # construct the random variables

        if self.pdf_xi_on:
            s.theta_vars['xi'] = RV('weibull_min', shape=4.54, scale=0.017)  # RV( pd = self.pdf_xi, name = 'xi', n_int = self.n_G_ipts )

        print self.pdf_theta.interp_ppf([0.01, 0.02])
        print YMB_RV('theta', distr=self.pdf_theta, n_int=self.n_G_ipts).distr.interp_ppf([0.01, 0.02])
        if self.pdf_theta_on:
            s.theta_vars['theta'] = YMB_RV('theta', distr=self.pdf_theta, n_int=self.n_G_ipts)

        if self.pdf_l_on:
            s.theta_vars['l'] = YMB_RV('l', distr=self.pdf_l, n_int=self.n_G_ipts)

        if self.pdf_phi_on:
            s.theta_vars['phi'] = YMB_RV('phi', distr=self.pdf_phi, n_int=self.n_G_ipts)

        # print 'checking unity', s.mu_q_arr()

        mu = s.mu_q_arr
        axes = self.figure.axes[0]
        # TODO:
        axes.plot(self.e_arr, mu * self.n_f,
                   linewidth=2, label=self.lab)

        axes.set_xlabel('crack opening w[mm]')
        axes.set_ylabel('force P[N]')
        axes.legend(loc='best')

        self.data_changed = True
Beispiel #6
0
def create_demo_object(fig_output_dir='fig'):

    #===========================================================================
    # Control variable
    #===========================================================================
    e_arr = np.linspace(0, 0.012, 80)

    powers = np.linspace(1, math.log(20, 10), 6)
    n_int_range = np.array(np.power(10, powers), dtype=int)

    #===========================================================================
    # Randomization
    #===========================================================================
    theta_vars = dict(
        fu=RV('weibull_min', 1200.0e6, 200.),
        qf=1500.0,
        # qf = RV('uniform', 1500., 100.),
        L=0.02,  # 
        # L = RV('uniform', 0.02, 0.02 / 2.),
        A=RV('norm', 5.30929158457e-10, .03 * 5.30929158457e-10),
        E_mod=RV('uniform', 70.e9, 250.e9),
        z=RV('uniform', 0.0, 0.03),
        phi=0.0,  # 
        # phi = RV('cos_distr', 0.0, 1.0),
        # phi = RV('uniform', 0.0, 1.0),
        f=RV('uniform', 0.0, 0.03))

    #===========================================================================
    # Integrator object
    #===========================================================================
    s = SPIRRID(
        q=ConstantFrictionFiniteFiber(),
        e_arr=e_arr,
        n_int=10,
        theta_vars=theta_vars,
    )

    #===========================================================================
    # Lab
    #===========================================================================
    slab = SPIRRIDLAB(s=s,
                      save_output=False,
                      show_output=True,
                      dpi=300,
                      fig_output_dir=fig_output_dir,
                      qname='fiber_po_8p',
                      plot_mode='subplots',
                      n_int_range=n_int_range,
                      extra_compiler_args=True,
                      le_sampling_lst=['LHS', 'PGrid'],
                      le_n_int_lst=[10, 10],
                      plot_sampling_idx=[
                          0,
                          3,
                      ])

    return slab
Beispiel #7
0
def create_demo_object(fig_output_dir='fig'):

    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)

    # n_int range for sampling efficiency test
    powers = np.linspace(1, math.log(500, 10), 50)
    n_int_range = np.array(np.power(10, powers), dtype=int)

    #===========================================================================
    # Randomization
    #===========================================================================
    s = SPIRRID(
        q=fiber_tt_2p(),
        sampling_type='TGrid',
        codegen_type='cython',
        e_arr=e_arr,
        n_int=10,
        theta_vars=dict(la=RV('norm', m_la, std_la),
                        xi=RV('norm', m_xi, std_xi)),
    )

    #===========================================================================
    # Exact solution
    #===========================================================================
    def mu_q_ex(e, m_xi, std_xi, m_la):
        return e * (0.5 - 0.5 * erf(0.5 * math.sqrt(2) *
                                    (e - m_xi) / std_xi)) * m_la

    #===========================================================================
    # Lab
    #===========================================================================
    slab = SPIRRIDLAB(s=s,
                      save_output=False,
                      show_output=True,
                      dpi=300,
                      fig_output_dir=fig_output_dir,
                      exact_arr=mu_q_ex(e_arr, m_xi, std_xi, m_la),
                      plot_mode='subplots',
                      n_int_range=n_int_range,
                      extra_compiler_args=True,
                      le_sampling_lst=['LHS', 'PGrid'],
                      le_n_int_lst=[440, 5000])

    return slab
Beispiel #8
0
    def _redraw(self):

        s = SPIRRID(
            q=self.rf,
            sampling_type='LHS',
            e_arr=self.e_arr,
            n_int=self.n_G_ipts,
            theta_vars=dict(tau_fr=2.6,
                            l=0.0,
                            d=25.5e-3,
                            E_mod=72.0e3,
                            theta=0.0,
                            xi=0.0179,
                            phi=1.,
                            L=30.0),
            # codegen_type='weave'
        )
        # construct the random variables

        if self.pdf_xi_on:
            s.theta_vars['xi'] = RV(
                'weibull_min', shape=4.54, scale=0.017
            )  # RV( pd = self.pdf_xi, name = 'xi', n_int = self.n_G_ipts )

        print self.pdf_theta.interp_ppf([0.01, 0.02])
        print YMB_RV('theta', distr=self.pdf_theta,
                     n_int=self.n_G_ipts).distr.interp_ppf([0.01, 0.02])
        if self.pdf_theta_on:
            s.theta_vars['theta'] = YMB_RV('theta',
                                           distr=self.pdf_theta,
                                           n_int=self.n_G_ipts)

        if self.pdf_l_on:
            s.theta_vars['l'] = YMB_RV('l',
                                       distr=self.pdf_l,
                                       n_int=self.n_G_ipts)

        if self.pdf_phi_on:
            s.theta_vars['phi'] = YMB_RV('phi',
                                         distr=self.pdf_phi,
                                         n_int=self.n_G_ipts)

        # print 'checking unity', s.mu_q_arr()

        mu = s.mu_q_arr
        axes = self.figure.axes[0]
        # TODO:
        axes.plot(self.e_arr, mu * self.n_f, linewidth=2, label=self.lab)

        axes.set_xlabel('crack opening w[mm]')
        axes.set_ylabel('force P[N]')
        axes.legend(loc='best')

        self.data_changed = True
Beispiel #9
0
 def _get_spirrid_lst(self):
     spirrid_epsm_list = []
     for reinf in self.short_reinf_lst:
         cb = CBShortFiberSP()
         spirrid = SPIRRID(q=cb,
                           sampling_type='LHS',
                           theta_vars=dict(epsm_softening=self.epsm_softening,
                                           tau=reinf.tau,
                                           E_f=reinf.E_f,
                                           r=reinf.r,
                                           xi=reinf.xi,
                                           snub=reinf.snub,
                                           le=reinf.le,
                                           phi=reinf.phi),
                           n_int=reinf.n_int)
         spirrid_epsm_list.append(spirrid)
     return spirrid_epsm_list
Beispiel #10
0
 def CB_composite_stress(w, tau, E_f, V_f, r, m, sV0, Pf, n_int):
     cb = CBClampedRandXi()
     spirrid = SPIRRID(q=cb,
                 sampling_type='PGrid',
                 eps_vars=dict(w=w),
                 theta_vars=dict(tau=tau, E_f=E_f, V_f=V_f, r=r,
                            m=m, sV0=sV0, Pf=Pf),
                 n_int=n_int)
     if isinstance(r, RV):
         r_arr = np.linspace(r.ppf(0.001), r.ppf(0.999), 300)
         Er = np.trapz(r_arr ** 2 * r.pdf(r_arr), r_arr)
     else:
         Er = r ** 2
     sigma_c = spirrid.mu_q_arr / Er    
     plt.plot(w, sigma_c, lw=2, label='sigma c')
     #plt.ylim(0, 35)
     plt.xlabel('w [mm]')
     plt.ylabel('sigma_c [MPa]')
     plt.legend(loc='best')
     plt.show()
Beispiel #11
0
def create_demo_object():

    #===========================================================================
    # Control variable
    #===========================================================================
    e_arr = np.linspace(0, 0.012, 80)

    #===========================================================================
    # Randomization
    #===========================================================================
    theta_vars = dict(#fu = 1200.0e6,
                 fu = RV('weibull_min', 1200.0e6, 200.),
                  qf = RV('uniform', 1500., 100.),
                  #qf = 1500.0,
                  L = 0.02, # 
                  # L = RV('uniform', 0.02, 0.02 / 2.),
                  A = 5.30929158457e-10,
                  #A = RV('norm', 5.30929158457e-10, .03 * 5.30929158457e-10),
                  E_mod = 70.0e9,
                  #E_mod = RV('uniform', 70.e9, 250.e9),
                  z = 0,
                  #z = RV('uniform', 0.0, 0.03),
                  phi = 0.0, # 
                  # phi = RV('cos_distr', 0.0, 1.0),
                  # phi = RV('uniform', 0.0, 1.0),
                  f = 0.01,
                  #f = RV('uniform', 0.0, 0.03),
                  )

    #===========================================================================
    # Integrator object
    #===========================================================================
    s = SPIRRID(q = ConstantFrictionFiniteFiber(),
                e_arr = e_arr,
                n_int = 10,
                theta_vars = theta_vars,
                )

    import pylab as p
    p.plot(e_arr, s.mu_q_arr)
    p.show()
Beispiel #12
0
    def setup_class(cls):

        np.random.seed(2356)

        #===========================================================================
        # Control variable
        #===========================================================================
        e_arr = np.linspace(0, 0.012, 80)

        cls.m_la, cls.std_la = 10., 1.0
        cls.m_xi, cls.std_xi = 1.0, 0.1

        #===========================================================================
        # Randomization
        #===========================================================================

        cls.s = SPIRRID(q = fiber_tt_2p(),
                         eps_vars = {'e':e_arr},
                         codegen_type = 'numpy',
                         n_int = 10,
                         theta_vars = dict(la = RV('norm', cls.m_la, cls.std_la),
                                      xi = RV('norm', cls.m_xi, cls.std_xi)
                                      ),
                         )
Beispiel #13
0
            ''' Response function of a single fiber '''
            return la * e * Heaviside(xi - e)

        C_code = '''
                // Computation of the q( ... ) function
                if ( eps > xi ){
                    q = 0.0;
                }else{
                    q = la * eps;
                }
            '''

    s = SPIRRID(q = fiber_tt_2p(),
                 codegen_type = 'numpy',
                 sampling_type = 'LHS',
                 e_arr = [np.linspace(0, 1, 10)],
                 tvars = dict(la = 1.0, # RV( 'norm', 10.0, 1.0 ),
                               xi = RV('norm', 1.0, 0.1))
                )

    s.codegen.implicit_var_eval = True

    print 'var_names', s.var_names
    print 'var_defaults', s.var_defaults

    print s.mu_q_arr
    print s.var_q_arr

    #===========================================================================
    # Response  
    #===========================================================================
    m = 5.0
    Pf = RV('uniform', loc=0., scale=1.0)

    rf = CBEMClampedFiberStressSP()
    ra = RangeAdaption(
        load_sigma_c_max=22.0,
        load_n_sigma_c=30,
        n_w=100,
        n_x=101,
        n_BC=2,
        spirrid=SPIRRID(q=rf,
                        sampling_type='LHS',
                        theta_vars=dict(tau=tau,
                                        l=l,
                                        E_f=E_f,
                                        theta=theta,
                                        xi=xi,
                                        phi=phi,
                                        E_m=E_m,
                                        r=r,
                                        V_f=V_f),
                        n_int=20),
    )

    isp = InterpolatedSPIRRID(adaption=ra)
    print 'no res', isp(isp.adaption.load_sigma_c, np.linspace(-50, 50, 20),
                        50., 50.)

    rf = CBEMClampedFiberStressResidualSP()
    ra = RangeAdaption(
        load_sigma_c_max=22.0,
        load_n_sigma_c=30,
Beispiel #15
0
def create_demo_object(fig_output_dir='fig'):

    D = 26 * 1.0e-6  # m
    A = (D / 2.0)**2 * math.pi

    # set the mean and standard deviation of the two random variables
    la_mean, la_stdev = 0.0, 0.2
    xi_mean, xi_stdev = 0.019027, 0.0022891
    E_mean, E_stdev = 70.0e+9, 15.0e+9
    th_mean, th_stdev = 0.0, 0.01
    A_mean, A_stdev = A * 0.3, 0.7 * A

    do = 'norm'

    if do == 'general':

        # set the mean and standard deviation of the two random variables
        la_mean, la_stdev = 0.0, 0.2
        xi_mean, xi_stdev = 0.019027, 0.0022891
        E_mean, E_stdev = 70.0e+9, 15.0e+9
        th_mean, th_stdev = 0.0, 0.01
        A_mean, A_stdev = A * 0.3, 0.7 * A

        # construct the normal distributions and get the methods
        # for the evaluation of the probability density functions
        g_la = RV('uniform', la_mean, la_stdev)
        g_xi = RV('norm', xi_mean, xi_stdev)
        g_E = RV('uniform', E_mean, E_stdev)
        g_th = RV('uniform', th_mean, th_stdev)
        g_A = RV('uniform', A_mean, A_stdev)

        mu_ex_file = 'fiber_tt_5p_30.txt'
        delimiter = ','

    elif do == 'uniform':

        # set the mean and standard deviation of the two random variables
        la_mean, la_stdev = 0.0, 0.2
        xi_mean, xi_stdev = 0.01, 0.02
        E_mean, E_stdev = 70.0e+9, 15.0e+9
        th_mean, th_stdev = 0.0, 0.01
        A_mean, A_stdev = A * 0.3, 0.7 * A

        # construct the uniform distributions and get the methods
        # for the evaluation of the probability density functions
        g_la = RV('uniform', la_mean, la_stdev)
        g_xi = RV('uniform', xi_mean, xi_stdev)
        g_E = RV('uniform', E_mean, E_stdev)
        g_th = RV('uniform', th_mean, th_stdev)
        g_A = RV('uniform', A_mean, A_stdev)

        mu_ex_file = 'fiber_tt_5p_n_int_40_norm_exact.txt'  # 'fiber_tt_5p_40_unif.txt'
        delimiter = ' '

    elif do == 'norm':

        # set the mean and standard deviation of the two random variables
        la_mean, la_stdev = 0.1, 0.02
        xi_mean, xi_stdev = 0.019027, 0.0022891
        E_mean, E_stdev = 70.0e+9, 15.0e+9
        th_mean, th_stdev = 0.005, 0.001
        A_mean, A_stdev = 5.3e-10, 1.0e-11

        # construct the normal distributions and get the methods
        # for the evaluation of the probability density functions
        g_la = RV('norm', la_mean, la_stdev)
        g_xi = RV('norm', xi_mean, xi_stdev)
        g_E = RV('norm', E_mean, E_stdev)
        g_th = RV('norm', th_mean, th_stdev)
        g_A = RV('norm', A_mean, A_stdev)

        mu_ex_file = os.path.join(file_dir,
                                  'fiber_tt_5p_n_int_40_norm_exact.txt')
        delimiter = ' '

    # discretize the control variable (x-axis)
    e_arr = np.linspace(0, 0.04, 40)

    # n_int range for sampling efficiency test
    powers = np.linspace(1, math.log(20, 10), 10)
    n_int_range = np.array(np.power(10, powers), dtype=int)

    #===========================================================================
    # Randomization
    #===========================================================================
    s = SPIRRID(
        q=fiber_tt_5p(),
        codegen_type='cython',
        e_arr=e_arr,
        n_int=10,
        theta_vars=dict(lambd=g_la, xi=g_xi, E_mod=g_E, theta=g_th, A=g_A),
    )

    # Exact solution
    def mu_q_ex(e):
        data = np.loadtxt(mu_ex_file, delimiter=delimiter)
        x, y = data[:, 0], data[:, 1]
        f = interp1d(x, y, kind='linear')
        return f(e)

    #===========================================================================
    # Lab
    #===========================================================================
    slab = SPIRRIDLAB(s=s,
                      save_output=False,
                      show_output=True,
                      dpi=300,
                      fig_output_dir=fig_output_dir,
                      exact_arr=mu_q_ex(e_arr),
                      plot_mode='subplots',
                      n_int_range=n_int_range,
                      extra_compiler_args=True,
                      le_sampling_lst=['LHS', 'PGrid'],
                      le_n_int_lst=[25, 30])

    return slab
Beispiel #16
0
    # discretize the control variable (x-axis)
    e_arr = np.linspace(0, 1.2, 40)

    # Exact solution
    def mu_q_ex(e, m_xi, std_xi, m_la):
        return e * (0.5 - 0.5 * erf(0.5 * math.sqrt(2) * (e - m_xi) / std_xi)) * m_la

    mu_q_ex_arr = mu_q_ex(e_arr, m_xi, std_xi, m_la)

    g_la = RV('norm', m_la, std_la)
    g_xi = RV('norm', m_xi, std_xi)

    s = SPIRRID(q=fiber_tt_2p,
                e_arr=e_arr,
                n_int=10,
                theta_vars=dict(la=g_la, xi=g_xi),
                )

    mu_q_ex_arr = mu_q_ex(e_arr, m_xi, std_xi, m_la)

    slab = SPIRRIDLAB(s=s, save_output=False, show_output=True,
                      exact_arr=mu_q_ex(e_arr, m_xi, std_xi, m_la))

    slab.configure_traits(kind='live')

#    powers = np.linspace(1, math.log(200, 10), 50)
#    n_int_range = np.array(np.power(10, powers), dtype = int)
#
#    slab.sampling_efficiency(n_int_range = n_int_range)
Beispiel #17
0
def main():

    #===========================================================================
    # Response function
    #===========================================================================
    class fiber_tt_5p_np(RF):
        ''' Response function of a single fiber '''
        implements(IRF)

        title = Str('brittle filament')

        def __call__(self, eps, lambd, xi, E_mod, theta, A):
            '''
            Implements the response function with arrays as variables.
            first extract the variable discretizations from the orthogonal grid.
            '''
            eps_ = (eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd))

            eps_ *= Heaviside(eps_)
            eps_grid = eps_ * Heaviside(xi - eps_)
            q_grid = E_mod * A * eps_grid

            return q_grid

    class fiber_tt_5p_ne(RF):
        ''' Response function of a single fiber '''
        implements(IRF)

        title = Str('brittle filament')

        def __call__(self, eps, lambd, xi, E_mod, theta, A):
            '''
            Implements the response function with arrays as variables.
            first extract the variable discretizations from the orthogonal grid.
            '''
            eps_ = ne.evaluate(
                "((eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd)))")
            tmp = Heaviside_ne(eps_)
            eps_ = ne.evaluate('eps_*tmp')
            tmp = Heaviside_ne(ne.evaluate("(xi - eps_)"))
            eps_grid = ne.evaluate("eps_ * tmp")
            q_grid = ne.evaluate("E_mod * A * eps_grid")

            return q_grid
            # all in one row, slower alternative
            #return ne.evaluate("E_mod * A *((eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd))) * (((eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd)))>=0) *  ((xi-((eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd))))>=0)")

    # set the mean and standard deviation of the two random variables
    la_mean, la_stdev = 0.1, 0.02
    xi_mean, xi_stdev = 0.019027, 0.0022891
    E_mean, E_stdev = 70.0e+9, 15.0e+9
    th_mean, th_stdev = 0.005, 0.001
    A_mean, A_stdev = 5.3e-10, 1.0e-11

    # construct the normal distributions and get the methods
    # for the evaluation of the probability density functions
    g_la = RV('norm', la_mean, la_stdev)
    g_xi = RV('norm', xi_mean, xi_stdev)
    g_E = RV('norm', E_mean, E_stdev)
    g_th = RV('norm', th_mean, th_stdev)
    g_A = RV('norm', A_mean, A_stdev)

    # discretize the control variable (x-axis)
    e_arr = np.linspace(0, 0.04, 80)

    #===========================================================================
    # Randomization
    #===========================================================================

    s_ne = SPIRRID(
        q=fiber_tt_5p_ne(),
        e_arr=e_arr,
        n_int=10,
        theta_vars=dict(lambd=g_la, xi=g_xi, E_mod=g_E, theta=g_th, A=g_A),
    )
    s_np = SPIRRID(
        q=fiber_tt_5p_np(),
        e_arr=e_arr,
        n_int=10,
        theta_vars=dict(lambd=g_la, xi=g_xi, E_mod=g_E, theta=g_th, A=g_A),
    )

    print 'Evaluation using NumPy'
    print 'numpy time', s_np.exec_time
    print 'Evaluation using numexpr'
    print 'numexpr time', s_ne.exec_time

    p.plot(e_arr, s_np.mu_q_arr, label='numpy')
    p.plot(e_arr, s_ne.mu_q_arr, label='numexpr')
    p.legend()
    p.show()
Beispiel #18
0
 def _get_spirrid(self):
     args = self.randomization.trait_get(['q', 'eps_vars', 'theta_vars'])
     return SPIRRID(**args)