docstr: Test running model for a vector ODE with 2 parameters
docstr_tok: ["Test","running","model","for","a","vector","ODE","with","2","parameters"]
code: def test_vector_ode_2_param(self):
      """Test running model for a vector ODE with 2 parameters"""
  
      def system(y, t, p):
          ds = -p[0] * y[0] * y[1]
          di = p[0] * y[0] * y[1] - p[1] * y[1]
          return [ds, di]
  
      times = np.array(
          [0.0, 0.8, 1.6, 2.4, 3.2, 4.0, 4.8, 5.6, 6.4, 7.2, 8.0]
      )
  
      yobs = np.array(
          [
              [1.02, 0.02],
              [0.86, 0.12],
              [0.43, 0.37],
              [0.14, 0.42],
              [0.05, 0.43],
              [0.03, 0.14],
              [0.02, 0.08],
              [0.02, 0.04],
              [0.02, 0.01],
              [0.02, 0.01],
              [0.02, 0.01],
          ]
      )
  
      ode_model = DifferentialEquation(
          func=system, t0=0, times=times, n_states=2, n_theta=2
      )
  
      with pm.Model() as model:
          beta = pm.HalfCauchy("beta", 1, initval=1)
          gamma = pm.HalfCauchy("gamma", 1, initval=1)
          sigma = pm.HalfCauchy("sigma", 1, shape=2, initval=[1, 1])
          forward = ode_model(theta=[beta, gamma], y0=[0.99, 0.01])
          y = pm.LogNormal(
              "y", mu=pm.math.log(forward), sigma=sigma, observed=yobs
          )
  
          with pytensor.config.change_flags(
              mode=fast_unstable_sampling_mode
          ):
              with warnings.catch_warnings():
                  warnings.filterwarnings(
                      "ignore", ".*number of samples.*", UserWarning
                  )
                  warnings.filterwarnings(
                      "ignore",
                      "invalid value encountered in log",
                      RuntimeWarning,
                  )
                  idata = pm.sample(50, tune=0, chains=1)
  
      assert idata.posterior["beta"].shape == (1, 50)
      assert idata.posterior["gamma"].shape == (1, 50)
      assert idata.posterior["sigma"].shape == (1, 50, 2)
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from scipy.stats import norm
  import pymc
  from pymc.ode import DifferentialEquation
  from pymc.testing import fast_unstable_sampling_mode
label_desc: Use image node_id 5 for calling the TestDiffEqModel obj's underlying member method code with example usage: obj.test_vector_ode_2_param() and returns: list