def test_parse_covariogram(self): cov_model = '1.0 Exp(10.5) + 2.3 Sph(20.4) + 5.0 Nug(0.)' h = 5.0 c = ipol.parse_covariogram(cov_model) ci = sum([ipol.cov_exp(h, 1., 10.5), ipol.cov_sph(h, 2.3, 20.4), ipol.cov_nug(h, 5.0, 0.)]) self.assertTrue(c(h) == ci)
def test_parse_covariogram(self): cov_model = "1.0 Exp(10.5) + 2.3 Sph(20.4) + 5.0 Nug(0.)" h = 5.0 c = ipol.parse_covariogram(cov_model) ci = sum([ ipol.cov_exp(h, 1.0, 10.5), ipol.cov_sph(h, 2.3, 20.4), ipol.cov_nug(h, 5.0, 0.0), ]) assert c(h) == ci