Skip to content

Commit

Permalink
quick fix exhaustiveSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
ttan06 committed Mar 13, 2024
1 parent 9758006 commit bf4c0a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions makeRoute/exhaustiveSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def reduce_schedule(schedule, teams, start_date, end_date):
if (pd.to_datetime(end_date) - pd.to_datetime(start_date)).days + 1 < len(teams):
raise ValueError('More teams than days')
sched_subset = schedule.loc[(schedule['date'] >= start_date) & (schedule['date'] <= end_date)]
for tm in teams:
if home_game_exists(sched_subset, tm) is False:
raise ValueError(tm + ' do not have a home game in this time frame')
for team_ in teams:
if home_game_exists(sched_subset, team_) is False:
raise ValueError(team_ + ' do not have a home game in this time frame')
sched_subset = sched_subset.loc[schedule['home team'].isin(teams)]
return sched_subset

Expand Down

0 comments on commit bf4c0a2

Please sign in to comment.