diff --git a/docs/source/_static/images/make_infectiousness_period.ipynb b/docs/source/_static/images/make_infectiousness_period.ipynb index 98714fd3..511d3c14 100644 --- a/docs/source/_static/images/make_infectiousness_period.ipynb +++ b/docs/source/_static/images/make_infectiousness_period.ipynb @@ -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" diff --git a/docs/source/_static/images/make_time_until_death.ipynb b/docs/source/_static/images/make_time_until_death.ipynb index 2b256418..c156451e 100644 --- a/docs/source/_static/images/make_time_until_death.ipynb +++ b/docs/source/_static/images/make_time_until_death.ipynb @@ -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)" ] diff --git a/docs/source/_static/images/make_time_until_icu_recovery.ipynb b/docs/source/_static/images/make_time_until_icu_recovery.ipynb index acbe7ad4..59159f00 100644 --- a/docs/source/_static/images/make_time_until_icu_recovery.ipynb +++ b/docs/source/_static/images/make_time_until_icu_recovery.ipynb @@ -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)" ] diff --git a/setup.cfg b/setup.cfg index 85391e77..9f57aa49 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,6 +20,7 @@ classifiers = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering project_urls = Changelog = https://sid-dev.readthedocs.io/en/latest/changes.html diff --git a/src/sid/msm.py b/src/sid/msm.py index 175e5b92..11ac6c0d 100644 --- a/src/sid/msm.py +++ b/src/sid/msm.py @@ -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, diff --git a/src/sid/update_states.py b/src/sid/update_states.py index 36ac3819..468f8873 100644 --- a/src/sid/update_states.py +++ b/src/sid/update_states.py @@ -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 )