Exemplo n.º 1
0
 def test_relaxation(self):
     """k=None"""
     relax_amp = np.dot(self.p0, self.R) * np.dot(self.L, self.obs)
     relax = np.dot(self.ev_t, relax_amp)
     relaxn = relaxation(self.T, self.p0, self.obs, times=self.times)
     assert_allclose(relaxn, relax)
     """k=4"""
     k = self.k
     relax_amp = np.dot(self.p0, self.R[:, 0:k]) * np.dot(
         self.L[0:k, :], self.obs)
     relax = np.dot(self.ev_t[:, 0:k], relax_amp)
     relaxn = relaxation(self.T, self.p0, self.obs, k=k, times=self.times)
     assert_allclose(relaxn, relax)
Exemplo n.º 2
0
 def test_relaxation(self):
     relax_amp = np.dot(self.p0, self.R) * np.dot(self.L, self.obs)
     relax = np.dot(self.ev_t, relax_amp)
     relaxn = relaxation(self.T,
                         self.p0,
                         self.obs,
                         k=self.k,
                         times=self.times)
     assert_allclose(relaxn, relax)