From 068637e9195a73c8cbe7a3d5ccf3389bfcc02757 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:25:58 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7333d8890..638305ff9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: hooks: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/cheshirekow/cmake-format-precommit From 631123a3220af3ca24cdddb8291f5d2ba2b5c818 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:26:34 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- bindings/python/proxsuite/torch/qplayer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/python/proxsuite/torch/qplayer.py b/bindings/python/proxsuite/torch/qplayer.py index 52d9fbda6..ae4e26a5d 100644 --- a/bindings/python/proxsuite/torch/qplayer.py +++ b/bindings/python/proxsuite/torch/qplayer.py @@ -414,9 +414,9 @@ def backward(ctx, dl_dzhat, dl_dlams, dl_dnus, dl_ds_e, dl_ds_i): if neq > 0: kkt[:dim, dim : dim + n_eq] = A_i.transpose() kkt[dim : dim + n_eq, :dim] = A_i - kkt[ - dim + n_eq + n_in : dim + 2 * n_eq + n_in, dim : dim + n_eq - ] = -np.eye(n_eq) + kkt[dim + n_eq + n_in : dim + 2 * n_eq + n_in, dim : dim + n_eq] = ( + -np.eye(n_eq) + ) kkt[ dim + n_eq + n_in : dim + 2 * n_eq + n_in, dim + n_eq + 2 * n_in : 2 * dim + n_eq + 2 * n_in, @@ -444,9 +444,9 @@ def backward(ctx, dl_dzhat, dl_dlams, dl_dnus, dl_ds_e, dl_ds_i): dim_ = 0 if n_eq > 0: dim_ += dim - kkt[ - dim + 2 * n_eq + n_in :, dim + n_eq + 2 * n_in + dim_ : - ] = np.multiply(np.diag(D_2_c)[:, None], C_i) + kkt[dim + 2 * n_eq + n_in :, dim + n_eq + 2 * n_in + dim_ :] = ( + np.multiply(np.diag(D_2_c)[:, None], C_i) + ) rhs = np.zeros(kkt.shape[0]) rhs[:dim] = -dl_dzhat[i]