How to use timeit for multiple values
<p>I've written a code which solves the linear equation Ax=b using LU decomposition and I am asked to compute the running times of this for various dimensions of the matrix A. </p>

<p>I can compute the running time of the code, be it for given A and b or for random ones of various dimensions, but I'm not sure how to implement the part of computing it for every single dimension. I thought it might be a simple <code>for</code> loop, but nothing worked.</p>

<pre><code>import timeit

setup = """
#function that solves the system
"""

repeats=5
result=timeit.timer('function', setup).timeit(number=repeats)/repeats
</code></pre>

<p>I also thought about using <code>timer.repeat</code> but it didn't really make sense, or I just couldn't understand how that would help me. Any tips would be greatly appreciated.</p>