Linear algebra

Matrix and vector products

dpnp.dot

Dot product of a and b.

dpnp.linalg.multi_dot

Compute the dot product of two or more arrays in a single function call.

dpnp.vdot

Return the dot product of two vectors.

dpnp.vecdot

Computes the vector dot product.

dpnp.linalg.vecdot

Computes the vector dot product.

dpnp.inner

Returns the inner product of two arrays.

dpnp.outer

Returns the outer product of two arrays.

dpnp.matmul

Matrix product of two arrays.

dpnp.linalg.matmul

Computes the matrix product.

dpnp.tensordot

Compute tensor dot product along specified axes.

dpnp.linalg.tensordot

Compute tensor dot product along specified axes.

dpnp.einsum

Evaluates the Einstein summation convention on the operands.

dpnp.einsum_path

Evaluates the lowest cost contraction order for an einsum expression by considering the creation of intermediate arrays.

dpnp.linalg.matrix_power

Raise a square matrix to the (integer) power n.

dpnp.kron

Kronecker product of two arrays.

dpnp.linalg.cross

Returns the cross product of 3-element vectors.

Decompositions

dpnp.linalg.cholesky

Cholesky decomposition.

dpnp.linalg.outer

Compute the outer product of two vectors.

dpnp.linalg.qr

Compute the qr factorization of a matrix.

dpnp.linalg.svd

Singular Value Decomposition.

dpnp.linalg.svdvals

Returns the singular values of a matrix (or a stack of matrices) x.

Matrix eigenvalues

dpnp.linalg.eig

Compute the eigenvalues and right eigenvectors of a square array.

dpnp.linalg.eigh

Return the eigenvalues and eigenvectors of a complex Hermitian (conjugate symmetric) or a real symmetric matrix.

dpnp.linalg.eigvals

Compute the eigenvalues of a general matrix.

dpnp.linalg.eigvalsh

Compute the eigenvalues of a complex Hermitian or real symmetric matrix.

Norms and other numbers

dpnp.linalg.norm

Matrix or vector norm.

dpnp.linalg.matrix_norm

Computes the matrix norm of a matrix (or a stack of matrices) x.

dpnp.linalg.vector_norm

Computes the vector norm of a vector (or batch of vectors) x.

dpnp.linalg.cond

Compute the condition number of a matrix.

dpnp.linalg.det

Compute the determinant of an array.

dpnp.linalg.matrix_rank

Return matrix rank of array using SVD method.

dpnp.linalg.slogdet

Compute the sign and (natural) logarithm of the determinant of an array.

dpnp.trace

Return the sum along diagonals of the array.

dpnp.linalg.trace

Returns the sum along the specified diagonals of a matrix (or a stack of matrices) x.

Solving linear equations

dpnp.linalg.solve

Solve a linear matrix equation, or system of linear scalar equations.

dpnp.linalg.tensorsolve

Solve the tensor equation a x = b for x.

dpnp.linalg.lstsq

Return the least-squares solution to a linear matrix equation.

dpnp.linalg.inv

Compute the (multiplicative) inverse of a matrix.

dpnp.linalg.pinv

Compute the (Moore-Penrose) pseudo-inverse of a matrix.

dpnp.linalg.tensorinv

Compute the 'inverse' of an N-dimensional array.

Other matrix operations

dpnp.diagonal

Return specified diagonals.

dpnp.linalg.diagonal

Returns specified diagonals of a matrix (or a stack of matrices) x.

Exceptions