Skip to content

Commit

Permalink
GSTools: always check field_dim instead of dim
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Aug 17, 2022
1 parent e6c46df commit 488835c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/pykrige/ok3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(
if hasattr(self.variogram_model, "pykrige_kwargs"):
# save the model in the class
self.model = self.variogram_model
if self.model.dim < 3:
if self.model.field_dim < 3:
raise ValueError("GSTools: model dim is not 3")
self.variogram_model = "custom"
variogram_function = self.model.pykrige_vario
Expand Down Expand Up @@ -430,7 +430,7 @@ def update_variogram_model(
if hasattr(self.variogram_model, "pykrige_kwargs"):
# save the model in the class
self.model = self.variogram_model
if self.model.dim < 3:
if self.model.field_dim < 3:
raise ValueError("GSTools: model dim is not 3")
self.variogram_model = "custom"
variogram_function = self.model.pykrige_vario
Expand Down
4 changes: 2 additions & 2 deletions src/pykrige/uk.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def __init__(
if hasattr(self.variogram_model, "pykrige_kwargs"):
# save the model in the class
self.model = self.variogram_model
if self.model.dim == 3:
if self.model.field_dim == 3:
raise ValueError("GSTools: model dim is not 1 or 2")
self.variogram_model = "custom"
variogram_function = self.model.pykrige_vario
Expand Down Expand Up @@ -673,7 +673,7 @@ def update_variogram_model(
if hasattr(self.variogram_model, "pykrige_kwargs"):
# save the model in the class
self.model = self.variogram_model
if self.model.dim == 3:
if self.model.field_dim == 3:
raise ValueError("GSTools: model dim is not 1 or 2")
self.variogram_model = "custom"
variogram_function = self.model.pykrige_vario
Expand Down
4 changes: 2 additions & 2 deletions src/pykrige/uk3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def __init__(
if hasattr(self.variogram_model, "pykrige_kwargs"):
# save the model in the class
self.model = self.variogram_model
if self.model.dim < 3:
if self.model.field_dim < 3:
raise ValueError("GSTools: model dim is not 3")
self.variogram_model = "custom"
variogram_function = self.model.pykrige_vario
Expand Down Expand Up @@ -515,7 +515,7 @@ def update_variogram_model(
if hasattr(self.variogram_model, "pykrige_kwargs"):
# save the model in the class
self.model = self.variogram_model
if self.model.dim < 3:
if self.model.field_dim < 3:
raise ValueError("GSTools: model dim is not 3")
self.variogram_model = "custom"
variogram_function = self.model.pykrige_vario
Expand Down

0 comments on commit 488835c

Please sign in to comment.