Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the numpy.linalg.lstsq rcond parameter not working according to the description?

I am trying to use the least squares solution from numpy (Description). According to the website to use the new default for the 'rcond' parameter: ''To silence the warning and use the new default, use rcond=None, to keep using the old behavior, use rcond=-1.''

With the rcond parameter set to None:

vector = np.linalg.lstsq(GA, FA, rcond = None)

It returns me an error:

TypeError: must be real number, not NoneType

Which does not happen when the parameter is taken away or set to -1.

I did some check and according to this post and one of the answers had an update stating that there were some recent changes on this method.

Then I would like to ask if someone else is having the same problem or if there is something as a typo on my line (Or something else I haven't thought about).

Kind Regards, Thanks for your time.

like image 988
Chicrala Avatar asked Nov 19 '25 09:11

Chicrala


1 Answers

You need NumPy >= 1.14. What version are you using?

like image 74
Charles Harris Avatar answered Nov 20 '25 23:11

Charles Harris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!