Skip to content

Commit 644b058

Browse files
committed
..
1 parent 52a1812 commit 644b058

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

petab/v2/core.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,11 +906,15 @@ def _validate_id(cls, v):
906906

907907
@field_validator("prior_parameters", mode="before")
908908
@classmethod
909-
def _validate_prior_parameters(cls, v):
909+
def _validate_prior_parameters(
910+
cls, v: str | list[str] | float | None | np.ndarray
911+
):
910912
if isinstance(v, float) and np.isnan(v):
911913
return []
912914

913915
if isinstance(v, str):
916+
if v == "":
917+
return []
914918
v = v.split(C.PARAMETER_SEPARATOR)
915919
elif not isinstance(v, Sequence):
916920
v = [v]
@@ -919,7 +923,7 @@ def _validate_prior_parameters(cls, v):
919923

920924
@field_validator("estimate", mode="before")
921925
@classmethod
922-
def _validate_estimate_before(cls, v):
926+
def _validate_estimate_before(cls, v: bool | str):
923927
if isinstance(v, bool):
924928
return v
925929

0 commit comments

Comments
 (0)