-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
close #1486 #1501
close #1486 #1501
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request!!
Please find my comments for discussion.
@@ -177,15 +177,15 @@ def dimensional_parameters(self) -> dict[str, float | int]: | |||
try: | |||
return { | |||
"alpha1 [-]": round(self._theta, 3), | |||
"1/alpha2 [day]": round(self._tau / 24 / 60 / self._kappa), | |||
"1/alpha2 [day]": round(self._tau / 24 / 60 / self._kappa) if self._kappa != 0 else np.NaN, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my missing in the discussion #1486, but the same error could be raised for the other parameters except for theta. If rho_i = 0 and sigma = 0 are acceptable, could you remove the ZeroDivisionError
and add "if" statements to the parameters?
Just a matter of preference, but we could remove != 0
because if not 0:
is always True
.
@@ -163,7 +163,7 @@ def dimensional_parameters(self) -> dict[str, float | int]: | |||
"""Calculate dimensional parameter values. | |||
Raises: | |||
ZeroDivisionError: either kappa or rho_i for i=1,2,3 or sigma value was over 0 | |||
ZeroDivisionError: rho_i for i=1,2,3 or sigma value was 0 | |||
Returns: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add | None
to the type hint and add "or None" to line 171 etc. for documentation.
3f2215b
to
db12452
Compare
5615635
to
12224c4
Compare
@karanjogi , |
99af80b
to
a2179d6
Compare
a2179d6
to
b4303de
Compare
13eff2d
to
c517bb1
Compare
c4c23b4
to
48adb28
Compare
0502114
to
8ca92d9
Compare
a10412a
to
c102012
Compare
e5e9d23
to
fc15801
Compare
feb5a10
to
1490caa
Compare
d4829d8
to
fe27725
Compare
b031992
to
dad8178
Compare
254b379
to
24dacfe
Compare
24dacfe
to
4a058b5
Compare
4a058b5
to
222c3dc
Compare
Related issues
[Bug] Error when the number of Fatal cases are not changing with SIR-D model #1486
What was changed
Edited SIRD, SIRF and SEWIRF models to have a condition in case Fatal cases didn't change for a phase.
Also added a test case for the above models to check that the models do not break after the changes.