Compute least-squares solution to equation :m:`a x = b`
Compute a vector x such that the 2-norm :m:`|b - a x|` is minimised.
Parameters: | a : array, shape (M, N) b : array, shape (M,) or (M, K) cond : float
overwrite_a : boolean
overwrite_b : boolean
|
---|---|
Returns: | x : array, shape (N,) or (N, K) depending on shape of b
residues : array, shape () or (1,) or (K,)
rank : integer
s : array, shape (min(M,N),)
Raises LinAlgError if computation does not converge : |