Compute least-squares solution to equation Ax = b.
Compute a vector x such that the 2-norm |b - A x| is minimized.
Parameters : | a : (M, N) array_like
b : (M,) or (M, K) array_like
cond : float, optional
overwrite_a : bool, optional
overwrite_b : bool, optional
check_finite : boolean, optional
|
---|---|
Returns : | x : (N,) or (N, K) ndarray
residues : () or (1,) or (K,) ndarray
rank : int
s : (min(M,N),) ndarray
|
Raises : | LinAlgError : :
|
See also