Skip to content

Commit

Permalink
throw error when no variables supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjwilson committed Oct 25, 2024
1 parent bf6f1c0 commit f008a3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ecoval/matchall.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,10 @@ def matchup(
point_surface_req = copy.deepcopy(point_surface)
benthic_req = copy.deepcopy(benthic)

# throw an error if all of these are empty
if len(surface) == 0 and len(bottom) == 0 and len(benthic) == 0:
raise ValueError("Please provide at least one variable to matchup")

if isinstance(exclude, str):
exclude = [exclude]

Expand Down

0 comments on commit f008a3b

Please sign in to comment.