numpy.linalg.tensorsolve()

numpy.linalg.tensorsolve(a, b, axes=None) [source] Solve the tensor equation a x = b for x. It is assumed that all indices of x are summed over in the product, together with the rightmost indices of a, as is done in, for example, tensordot(a, x, axes=len(b.shape)). Parameters: a : array_like Coefficient tensor, of shape b.shape + Q. Q, a tuple, equals the shape of that sub-tensor of a consisting of the appropriate number of its rightmost indices, and must be such that prod(Q) == prod(b.sh

numpy.linalg.tensorinv()

numpy.linalg.tensorinv(a, ind=2) [source] Compute the ?inverse? of an N-dimensional array. The result is an inverse for a relative to the tensordot operation tensordot(a, b, ind), i. e., up to floating-point accuracy, tensordot(tensorinv(a), a, ind) is the ?identity? tensor for the tensordot operation. Parameters: a : array_like Tensor to ?invert?. Its shape must be ?square?, i. e., prod(a.shape[:ind]) == prod(a.shape[ind:]). ind : int, optional Number of first indices that are involved

numpy.linalg.svd()

numpy.linalg.svd(a, full_matrices=1, compute_uv=1) [source] Singular Value Decomposition. Factors the matrix a as u * np.diag(s) * v, where u and v are unitary and s is a 1-d array of a?s singular values. Parameters: a : (..., M, N) array_like A real or complex matrix of shape (M, N) . full_matrices : bool, optional If True (default), u and v have the shapes (M, M) and (N, N), respectively. Otherwise, the shapes are (M, K) and (K, N), respectively, where K = min(M, N). compute_uv : boo

numpy.linalg.solve()

numpy.linalg.solve(a, b) [source] Solve a linear matrix equation, or system of linear scalar equations. Computes the ?exact? solution, x, of the well-determined, i.e., full rank, linear matrix equation ax = b. Parameters: a : (..., M, M) array_like Coefficient matrix. b : {(..., M,), (..., M, K)}, array_like Ordinate or ?dependent variable? values. Returns: x : {(..., M,), (..., M, K)} ndarray Solution to the system a x = b. Returned shape is identical to b. Raises: LinAlgError

numpy.linalg.slogdet()

numpy.linalg.slogdet(a) [source] Compute the sign and (natural) logarithm of the determinant of an array. If an array has a very small or very large determinant, then a call to det may overflow or underflow. This routine is more robust against such issues, because it computes the logarithm of the determinant rather than the determinant itself. Parameters: a : (..., M, M) array_like Input array, has to be a square 2-D array. Returns: sign : (...) array_like A number representing the si

numpy.linalg.qr()

numpy.linalg.qr(a, mode='reduced') [source] Compute the qr factorization of a matrix. Factor the matrix a as qr, where q is orthonormal and r is upper-triangular. Parameters: a : array_like, shape (M, N) Matrix to be factored. mode : {?reduced?, ?complete?, ?r?, ?raw?, ?full?, ?economic?}, optional If K = min(M, N), then ?reduced? : returns q, r with dimensions (M, K), (K, N) (default) ?complete? : returns q, r with dimensions (M, M), (M, N) ?r? : returns r only with dimensions (K, N) ?

numpy.linalg.pinv()

numpy.linalg.pinv(a, rcond=1e-15) [source] Compute the (Moore-Penrose) pseudo-inverse of a matrix. Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all large singular values. Parameters: a : (M, N) array_like Matrix to be pseudo-inverted. rcond : float Cutoff for small singular values. Singular values smaller (in modulus) than rcond * largest_singular_value (again, in modulus) are set to zero. Returns: B : (N, M) ndarray The ps

numpy.linalg.norm()

numpy.linalg.norm(x, ord=None, axis=None, keepdims=False) [source] Matrix or vector norm. This function is able to return one of eight different matrix norms, or one of an infinite number of vector norms (described below), depending on the value of the ord parameter. Parameters: x : array_like Input array. If axis is None, x must be 1-D or 2-D. ord : {non-zero int, inf, -inf, ?fro?, ?nuc?}, optional Order of the norm (see table under Notes). inf means numpy?s inf object. axis : {int, 2

numpy.linalg.matrix_rank()

numpy.linalg.matrix_rank(M, tol=None) [source] Return matrix rank of array using SVD method Rank of the array is the number of SVD singular values of the array that are greater than tol. Parameters: M : {(M,), (M, N)} array_like array of <=2 dimensions tol : {None, float}, optional threshold below which SVD values are considered zero. If tol is None, and S is an array with singular values for M, and eps is the epsilon value for datatype of S, then tol is set to S.max() * max(M.shape)

numpy.linalg.matrix_power()

numpy.linalg.matrix_power(M, n) [source] Raise a square matrix to the (integer) power n. For positive integers n, the power is computed by repeated matrix squarings and matrix multiplications. If n == 0, the identity matrix of the same shape as M is returned. If n < 0, the inverse is computed and then raised to the abs(n). Parameters: M : ndarray or matrix object Matrix to be ?powered.? Must be square, i.e. M.shape == (m, m), with m a positive integer. n : int The exponent can be any