Skip to content

Commit

Permalink
Merge pull request #66 from simpeg/epsilon-equal-zero
Browse files Browse the repository at this point in the history
Fix misleading error message for epsilon values
  • Loading branch information
jcapriot authored Oct 30, 2023
2 parents 7cfdb78 + 2bdf60a commit 5408065
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion geoana/em/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def epsilon(self, value):
raise TypeError(f"epsilon must be a number, got {type(value)}")

if value < 0.0:
raise ValueError("epsilon must be greater than 0")
raise ValueError(
f"Invalid epsilon '{value}': "
"epsilon must be greater or equal than zero."
)

self._epsilon = value

Expand Down

0 comments on commit 5408065

Please sign in to comment.