jax.scipy.linalg.solve(a, b, sym_pos=False, 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






positive definite


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.

  • a ((N, N) array_like) – Square input data

  • b ((N, NRHS) array_like) – Input data for the right hand side.

  • sym_pos (bool, optional, deprecated) –

    Assume a is symmetric and positive definite.

    Deprecated since version 0.19.0: This keyword is deprecated and should be replaced by using assume_a = 'pos'. sym_pos will be removed in SciPy 1.11.0.

  • lower (bool, optional) – If True, only the data contained in the lower triangle of a. Default is to use upper triangle. (ignored for 'gen')

  • assume_a (str, optional) – Valid entries are explained above.


x – The solution array.

Return type

(N, NRHS) ndarray