Skip to content

Commit

Permalink
tests: update tests to check for new var/nugget/sill handling
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Jan 6, 2025
1 parent 050cc37 commit b120d93
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/test_covmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,16 @@ def test_fitting(self):

# treatment of sill/var/nugget by fitting
model = Stable()
model.fit_variogram(
self.gamma_x, self.gamma_y, nugget=False, var=False, sill=2
)
self.assertAlmostEqual(model.var, 1)
self.assertAlmostEqual(model.nugget, 1)
with self.assertRaises(ValueError):
model.fit_variogram(
self.gamma_x, self.gamma_y, nugget=False, var=False, sill=2
)
model.fit_variogram(self.gamma_x, self.gamma_y, var=2, sill=3)
self.assertAlmostEqual(model.var, 2)
self.assertAlmostEqual(model.nugget, 1)
model.var = 3
model.fit_variogram(
self.gamma_x, self.gamma_y, nugget=False, var=False, sill=2
)
self.assertAlmostEqual(model.var, 2)
self.assertAlmostEqual(model.nugget, 0)
with self.assertRaises(ValueError):
model.fit_variogram(self.gamma_x, self.gamma_y, var=False, sill=2)
model.fit_variogram(self.gamma_x, self.gamma_y, weights="inv")
len_save = model.len_scale
model.fit_variogram(
Expand Down

0 comments on commit b120d93

Please sign in to comment.