Traktor/myenv/Lib/site-packages/sympy/solvers/benchmarks/bench_solvers.py
2024-05-26 05:12:46 +02:00

13 lines
288 B
Python

from sympy.core.symbol import Symbol
from sympy.matrices.dense import (eye, zeros)
from sympy.solvers.solvers import solve_linear_system
N = 8
M = zeros(N, N + 1)
M[:, :N] = eye(N)
S = [Symbol('A%i' % i) for i in range(N)]
def timeit_linsolve_trivial():
solve_linear_system(M, *S)