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