Skip to content

Commit

Permalink
Avoid getting an error if theta is None.
Browse files Browse the repository at this point in the history
We treat an unspecified `theta` as "constant parameters" (across
realizations).
  • Loading branch information
ioannis-vm committed Nov 21, 2024
1 parent 1d75300 commit f025231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pelicun/uq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,8 @@ def constant_parameters(self) -> bool:
True if the parameters are constant, false otherwise.
"""
assert self.theta is not None
if self.theta is None:
return True
assert self.theta.ndim in {1, 2}
return self.theta.ndim == 1

Expand Down

0 comments on commit f025231

Please sign in to comment.