Skip to content

Commit

Permalink
Fix elwise comparison in sampling strategy check
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-andersson committed Oct 11, 2023
1 parent f2bee1f commit ac5f76d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepsensor/data/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,8 @@ def sample_variable(var, sampling_strat, seed):
if split_frac < 0 or split_frac > 1:
raise ValueError(f"split_frac must be between 0 and 1, got {split_frac}")
if self.links is None:
b1 = any([strat in ["split", "gapfill"] for strat in context_sampling])
b2 = any([strat in ["split", "gapfill"] for strat in target_sampling])
b1 = any([strat == _ for _ in ["split", "gapfill"] for strat in context_sampling])
b2 = any([strat == _ for _ in ["split", "gapfill"] for strat in target_sampling])
if b1 or b2:
raise ValueError(
"If using 'split' or 'gapfill' sampling strategies, the context and target "
Expand Down

0 comments on commit ac5f76d

Please sign in to comment.