jax.scipy.linalg.solve

Contents

jax.scipy.linalg.solve#

jax.scipy.linalg.solve(a, b, lower=False, overwrite_a=False, overwrite_b=False, debug=False, check_finite=True, assume_a='gen')[source]#

Solves the linear equation set a @ x == b for the unknown x

LAX-backend implementation of scipy.linalg._basic.solve().

Does not support the Scipy argument check_finite=True, because compiled JAX code cannot perform checks of array values at runtime.

Does not support the Scipy argument overwrite_*=True.

Original docstring below.

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, default: False) – Ignored if assume_a == 'gen' (the default). If True, the calculation uses only the data in the lower triangle of a; entries above the diagonal are ignored. If False (default), the calculation uses only the data in the upper triangle of a; entries below the diagonal are ignored.

  • assume_a (str, {'gen', 'sym', 'her', 'pos'}) – Valid entries are explained above.

  • overwrite_a (bool)

  • overwrite_b (bool)

  • debug (bool)

  • check_finite (bool)

Returns:

x – The solution array.

Return type:

(N, NRHS) ndarray