drrelyea / spgl1

Port of SPGL1 to python
GNU Lesser General Public License v2.1
45 stars 29 forks source link

spgl1() got multiple values for argument 'x0' #29

Closed GillesC closed 3 years ago

GillesC commented 3 years ago

you provide both x0 separately and through **kwargs to the spfl1 function:

x0 = None
x, r, g, info = spgl1(A, b, tau, sigma, x0, **kwargs)

at this line.

You could discard the x0 = None is this is by default None in spgl1() and the same applies for tau.

mrava87 commented 3 years ago

Hi @GillesC, thanks!

I think you are right, the x0=None is redundant as this is already the default behavior of spgl1 so if you don't provide it, it will work the same way. And of course if you provide it in kwargs it will overwrite as it comes after.

You want to make a PR and remove x0=None in this and also spg_lassom spg_bp, and spg_bpdn?

GillesC commented 3 years ago

Done :) Thank you for library!