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 Jan 29, 2024
1 parent 068637e commit 631123a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bindings/python/proxsuite/torch/qplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 631123a

Please sign in to comment.