Skip to content

Commit

Permalink
[Doc][BugFix] Do not slice returned array in solvers examples. (#60)
Browse files Browse the repository at this point in the history
(cherry picked from commit 59ef896)
  • Loading branch information
AdriaJ authored and joanrue committed Apr 4, 2024
1 parent 47d8fba commit 42507e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyxu/opt/solver/pds.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class CondatVu(_PrimalDualSplitting):
cv = CV(f=F, g=0.01 * pxo.L1Norm(N), h=0.1 * pxo.L1Norm(N), K=D)
x0, z0 = np.zeros((2, N))
cv.fit(x0=x0, z0=z0)
x_recons = cv.solution()[0]
x_recons = cv.solution()
plt.figure()
plt.stem(x, linefmt="C0-", markerfmt="C0o")
Expand Down Expand Up @@ -727,7 +727,7 @@ class PD3O(_PrimalDualSplitting):
pd3o = PD3O(f=F, g=0.01 * pxo.L1Norm(N), h=0.1 * pxo.L1Norm(N), K=D)
x0, z0 = np.zeros((2, N))
pd3o.fit(x0=x0, z0=z0)
x_recons = pd3o.solution()[0]
x_recons = pd3o.solution()
plt.figure()
plt.stem(x, linefmt="C0-", markerfmt="C0o")
Expand Down

0 comments on commit 42507e3

Please sign in to comment.