From 258a74cf935f9061029cefcf8fafed96e665f980 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 06:16:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/dl_workshop/answers.py | 2 +- src/dl_workshop/gaussian_mixture.py | 1 - src/dl_workshop/jax_idioms.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dl_workshop/answers.py b/src/dl_workshop/answers.py index 378f518..20edd5f 100644 --- a/src/dl_workshop/answers.py +++ b/src/dl_workshop/answers.py @@ -81,7 +81,7 @@ def logistic_loss(params, model, x, y): def f(w): - return w ** 2 + 3 * w - 5 + return w**2 + 3 * w - 5 def df(w): diff --git a/src/dl_workshop/gaussian_mixture.py b/src/dl_workshop/gaussian_mixture.py index 9aa6cb2..8e7dd73 100644 --- a/src/dl_workshop/gaussian_mixture.py +++ b/src/dl_workshop/gaussian_mixture.py @@ -251,7 +251,6 @@ def joint_loglike( log_component_scales, observed_data, ): - # logpdf of weights under concentrations prior logp_weights = component_probs_loglike( log_component_weights, log_concentration diff --git a/src/dl_workshop/jax_idioms.py b/src/dl_workshop/jax_idioms.py index e3b141e..4910bf1 100644 --- a/src/dl_workshop/jax_idioms.py +++ b/src/dl_workshop/jax_idioms.py @@ -93,7 +93,7 @@ def randomness_ex_3(key, num_realizations: int, grw_draw: Callable): def goldfield(x, y): """All credit to https://www.analyzemath.com/calculus/multivariable/maxima_minima.html for this function.""" - return (2 * x ** 2) - (4 * x * y) + (y ** 4 + 2) + return (2 * x**2) - (4 * x * y) + (y**4 + 2) def grad_ex_1():