Closed dfukagaw28 closed 11 months ago
from matching.games import HospitalResident num_residents, num_hospitals = 3, 2 resident_prefs = {0: [0], 1: [1], 2: [0]} hospital_prefs = {0: [2, 1, 0], 1: [1, 2, 0]} capacities = {0: 1, 1: 1} game = HospitalResident.create_from_dictionaries( resident_prefs, hospital_prefs, capacities ) game.solve()
throws ValueError: list.remove(x): x not in list at: https://github.com/daffidwilde/matching/blob/1.4.2/src/matching/algorithms/hospital_resident.py#L97
ValueError: list.remove(x): x not in list
does not try to remove successor when it does not exist in the list free_residents.
successor
free_residents
Steps to Reproduce
Current Behavior
throws
ValueError: list.remove(x): x not in list
at: https://github.com/daffidwilde/matching/blob/1.4.2/src/matching/algorithms/hospital_resident.py#L97Expected Behavior
does not try to remove
successor
when it does not exist in the listfree_residents
.