You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Gingleator, if all districts become majority-minority, then an error occurs on line 144 of reward_partial_dist(). In this case, it tries to take the max( ) over an empty list, and the code breaks. The same issue could arise on line 171 of reward_next_highest_close().
It would be great if GerryChain could terminate gracefully in such circumstances, either terminating the chain early because a global max has been found, or finishing the chain as intended but without returning an exception. Either seems reasonable to me.
The text was updated successfully, but these errors were encountered:
In Gingleator, if all districts become majority-minority, then an error occurs on line 144 of reward_partial_dist(). In this case, it tries to take the max( ) over an empty list, and the code breaks. The same issue could arise on line 171 of reward_next_highest_close().
GerryChain/gerrychain/optimization/gingleator.py
Line 144 in a83acf5
GerryChain/gerrychain/optimization/gingleator.py
Line 171 in a83acf5
It would be great if GerryChain could terminate gracefully in such circumstances, either terminating the chain early because a global max has been found, or finishing the chain as intended but without returning an exception. Either seems reasonable to me.
The text was updated successfully, but these errors were encountered: