根据说明,numpy.linalg.lstsq rcond参数不起作用吗? [英] Is the numpy.linalg.lstsq rcond parameter not working according to the description?
问题描述
我正在尝试使用numpy中的最小二乘解法(
将rcond参数设置为无": 它返回一个错误: 删除参数或将其设置为-1时不会发生. 我做了一些检查,并根据此解决方案vector = np.linalg.lstsq(GA, FA, rcond = None)
TypeError: must be real number, not NoneType
您需要NumPy> = 1.14.您使用的是什么版本?
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.
You need NumPy >= 1.14. What version are you using?
这篇关于根据说明,numpy.linalg.lstsq rcond参数不起作用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!