- solve(x1: array, x2: array, /) array ¶
Returns the solution to the system of linear equations represented by the well-determined (i.e., full rank) linear matrix equation
AX = B.
Whether an array library explicitly checks whether an input array is full rank is implementation-defined.
x1 (array) – coefficient array
(..., M, M)and whose innermost two dimensions form square matrices. Must be of full rank (i.e., all rows or, equivalently, columns must be linearly independent). Should have a floating-point data type.
x2 (array) – ordinate (or “dependent variable”) array
x2is equivalent to an array having shape
(..., M, 1). If
(..., M, K), each column
kdefines a set of ordinate values for which to compute a solution, and
shape(x2)[:-1]must be compatible with
shape(x1)[:-1](see Broadcasting). Should have a floating-point data type.
out (array) – an array containing the solution to the system
AX = Bfor each square matrix. The returned array must have the same shape as
x2(i.e., the array corresponding to
B) and must have a floating-point data type determined by Type Promotion Rules.