tensor.slinalg – Linear Algebra Ops Using Scipy

Note

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

API

aesara.tensor.slinalg.kron(a, b)[source]

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.

aesara.tensor.slinalg.solve(a, b)[source]

Solves the linear equation set a * x = b for the unknown x for square a matrix.

If the data matrix is known to be a particular type then supplying the corresponding string to assume_a key chooses the dedicated solver. The available options are

generic matrix ‘gen’
symmetric ‘sym’
hermitian ‘her’
positive definite ‘pos’

If omitted, 'gen' is the default structure.

The datatype of the arrays define which solver is called regardless of the values. In other words, even when the complex array entries have precisely zero imaginary parts, the complex solver will be called based on the data type of the array.

Parameters:
  • a ((N, N) array_like) – Square input data
  • b ((N, NRHS) array_like) – Input data for the right hand side.
  • lower (bool, optional) – If True, only the data contained in the lower triangle of a. Default is to use upper triangle. (ignored for 'gen')
  • check_finite (bool, optional) – Whether to check that the input matrices contain only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs.
  • assume_a (str, optional) – Valid entries are explained above.
aesara.tensor.slinalg.solve_lower_triangular(a, b)[source]

Solve a system of linear equations.

aesara.tensor.slinalg.solve_upper_triangular(a, b)[source]

Solve a system of linear equations.