tensor.slinalg – Linear Algebra Ops Using Scipy

Note

This module is not imported by default. You need to import it to use it.

API

class theano.tensor.slinalg.Cholesky(lower=True)

Return a triangular matrix square root of positive semi-definite x.

L = cholesky(X, lower=True) implies dot(L, L.T) == X.

class theano.tensor.slinalg.CholeskyGrad(lower=True)
perform(node, inputs, outputs)

Implements the “reverse-mode” gradient [1] for the Cholesky factorization of a positive-definite matrix.

References

[1]S. P. Smith. “Differentiation of the Cholesky Algorithm”. Journal of Computational and Graphical Statistics, Vol. 4, No. 2 (Jun.,1995), pp. 134-147 http://www.jstor.org/stable/1390762
class theano.tensor.slinalg.Eigvalsh(lower=True)

Generalized eigenvalues of a Hermitian positive definite eigensystem.

class theano.tensor.slinalg.EigvalshGrad(lower=True)

Gradient of generalized eigenvalues of a Hermitian positive definite eigensystem.

class theano.tensor.slinalg.Expm(use_c_code='/usr/bin/g++')

Compute the matrix exponential of a square array.

class theano.tensor.slinalg.ExpmGrad(use_c_code='/usr/bin/g++')

Gradient of the matrix exponential of a square array.

class theano.tensor.slinalg.Solve(A_structure='general', lower=False, overwrite_A=False, overwrite_b=False)

Solve a system of linear equations.

theano.tensor.slinalg.kron(a, b)

Kronecker product.

Same as scipy.linalg.kron(a, b).

Parameters:
  • a (array_like) –
  • b (array_like) –
Returns:

Return type:

array_like with a.ndim + b.ndim - 2 dimensions

Notes

numpy.kron(a, b) != scipy.linalg.kron(a, b)! They don’t have the same shape and order when a.ndim != b.ndim != 2.