Skip to content

Commit

Permalink
Merge pull request #24 from kaklise/master
Browse files Browse the repository at this point in the history
Bug fix in add_grouping_constraint
  • Loading branch information
kaklise committed May 31, 2019
2 parents 173347a + 5c18ff0 commit 2c9a43c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chama/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ def _add_grouping_constraint(self, sensor_list, select=None,
elif min_select is not None and max_select is not None:
# Select between min_select and max_select sensors from
# sensor_list
if min_select < 0 or max_select:
if (min_select < 0) or (max_select < 0):
raise ValueError('Cannot select a negative number of sensors')

if min_select > max_select:
Expand Down

0 comments on commit 2c9a43c

Please sign in to comment.