def test_cov_sph(self): assert np.allclose(ipol.cov_sph([0.0, 5.0, 10.0]), np.array([1.0, 0.0, 0.0])) assert np.allclose( ipol.cov_sph([0.0, 5.0, 10.0], sill=2.0, rng=10.0), np.array([2.0, 0.625, 0.0]), )
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., 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
def test_cov_sph(self): self.assertTrue( np.allclose(ipol.cov_sph([0., 5., 10.]), np.array([1., 0., 0.]))) self.assertTrue( np.allclose(ipol.cov_sph([0., 5., 10.], sill=2., rng=10.), np.array([2., 0.625, 0.])))
def test_cov_sph(self): self.assertTrue( np.allclose(ipol.cov_sph([0., 5., 10.]), np.array([1., 0., 0.]))) self.assertTrue( np.allclose(ipol.cov_sph([0., 5., 10.], sill=2., rng=10.), np.array([2., 0.625, 0.])))