Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 6, 2022
1 parent 242eefa commit 7990170
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"source": [
"dist_mean = 2 * 0.12 + 4 * 0.29 + 6 * 0.47 + 10 * 0.12\n",
"dist_var = (\n",
" 2 ** 2 * 0.12 + 4 ** 2 * 0.29 + 6 ** 2 * 0.47 + 10 ** 2 * 0.12 - dist_mean ** 2\n",
" 2**2 * 0.12 + 4**2 * 0.29 + 6**2 * 0.47 + 10**2 * 0.12 - dist_mean**2\n",
")\n",
"dist_std = np.sqrt(dist_var)\n",
"dist_mean, dist_std"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/images/make_time_until_death.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"source": [
"mean = 11.74\n",
"std = 8.79\n",
"var = 8.79 ** 2\n",
"var = 8.79**2\n",
"\n",
"print(mean, std)"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"source": [
"mean = 18.8\n",
"std = 12.21\n",
"var = std ** 2\n",
"var = std**2\n",
"\n",
"print(mean, std)"
]
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Scientific/Engineering
project_urls =
Changelog = https://sid-dev.readthedocs.io/en/latest/changes.html
Expand Down
2 changes: 1 addition & 1 deletion src/sid/msm.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _msm(
moment_errors = flat_simulated_moments - flat_empirical_moments

root_contribs = np.sqrt(np.diagonal(weighting_matrix)) * moment_errors
value = np.sum(root_contribs ** 2)
value = np.sum(root_contribs**2)

out = {
"value": value,
Expand Down
2 changes: 1 addition & 1 deletion src/sid/update_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _get_waning_immunity_coefficients(
("immunity", "immunity_waning", f"slope_after_maximum_{event}"), "value"
]

slope_before_maximum = maximum_immunity / (time_to_reach_maximum ** 3)
slope_before_maximum = maximum_immunity / (time_to_reach_maximum**3)
intercept_after_maximum = (
maximum_immunity - slope_after_maximum * time_to_reach_maximum
)
Expand Down

0 comments on commit 7990170

Please sign in to comment.