Skip to content

Commit

Permalink
Merge pull request #300 from Simple-Robotics/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
jcarpent authored Jan 31, 2024
2 parents 97296bc + 631123a commit 80ab83d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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 80ab83d

Please sign in to comment.