Commit 2102533
committed
bug: ensure array shape consistency in leastsquares solvers
PyLops solvers output the solution as a nd-shaped array
if the initial model is fed as nd-arrays or if the initial
model is not fed (x0=0) and the operator has forceflat=False. As a side
effect, if x0 is NOT passed as a kwarg (but just as the third arg of
the solver) and the operator forceflat=False, the output is reshaped
even if x0 is a flattened array. I fix this inconsistency making x0
a kwarg when basic solvers are called within a leastsquares solver.1 parent 2d749a2 commit 2102533
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
| 819 | + | |
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| |||
0 commit comments