mirror of
https://github.com/JHUAPL/SIMoN.git
synced 2026-01-09 14:57:56 -05:00
temp bug fix: round negative population values to zero
Former-commit-id: fdb6e6fc3f43b9133bdc029fca7c6d8ae9c77cfc
This commit is contained in:
@@ -23,7 +23,8 @@ def pop_sim(init_data, num_increments):
|
||||
|
||||
last_inc = int(max(data[key].keys()))
|
||||
for inc, value in zip(range(num_increments), future_pop):
|
||||
data[key][str(last_inc + 1 + inc)] = value
|
||||
# round negative population values to 0
|
||||
data[key][str(last_inc + 1 + inc)] = value if value > 0 else 0
|
||||
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user