File tree 2 files changed +6
-2
lines changed
e2e/cypress/integration/tests
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ context('Actions', () => {
10
10
11
11
// This gets the "first" input from the sidebar. From clicking step up,
12
12
// the Regional Population should increase from default 4119405 to 4219405.
13
+ // Updated to 3600000
13
14
cy . get ( 'input.st-al' ) . eq ( 0 )
14
- . should ( 'has.value' , '4119406 ' )
15
+ . should ( 'has.value' , '3600000 ' )
15
16
} )
16
17
} ) ;
Original file line number Diff line number Diff line change @@ -182,7 +182,10 @@ def get_loss(self) -> float:
182
182
183
183
184
184
def get_argmin_ds (census_df : pd .DataFrame , current_hospitalized : float ) -> float :
185
- losses_df = (census_df .hospitalized - current_hospitalized ) ** 2.0
185
+ # By design, this forbids choosing a day after the peak
186
+ # If that's a problem, see #381
187
+ peak_day = census_df .hospitalized .argmax ()
188
+ losses_df = (census_df .hospitalized [:peak_day ] - current_hospitalized ) ** 2.0
186
189
return losses_df .argmin ()
187
190
188
191
You can’t perform that action at this time.
0 commit comments