Traktor/myenv/Lib/site-packages/sympy/solvers/benchmarks/bench_solvers.py

13 lines
288 B
Python
Raw Normal View History

2024-05-23 01:57:24 +02:00
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)