-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional max_attempts argument to bipartition tree funcs (#389)
* Add optional max_attempts argument to bipartition tree funcs This patch adds a max_attempts argument to the bipartition_tree funcs in `gerrychain.tree`. If max_attempts is None, it will default to the previous behavior (i.e. it will hang if it gets stuck). If max_attempts is set, it will throw a RuntimeError when `max_attempts` is reached. This patch is based off code from Robi Huq (via Jeanne Clelland), but is rewritten. Any mistakes are likely my own. * Bump up default max_attempts to 10k, just in case Co-authored-by: Robi Huq <robiohuq@gmail.com>
- Loading branch information
1 parent
ae7e776
commit 005d77a
Showing
1 changed file
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters