Skip to content

Commit 9b653b8

Browse files
committed
Website build
1 parent a4a1239 commit 9b653b8

24 files changed

+3880
-227
lines changed
93.7 KB
Binary file not shown.

L0_setup.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ <h2><span class="section-number">1.7. </span>Running your work<a class="headerli
413413
<p>To use IPython, type <cite>ipython</cite> in the Terminal (when the venv is
414414
activated). You may need to install it first using <cite>python -m pip install
415415
ipython</cite> (you must start the venv first). Then you can import
416-
<code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils</span></code> interactively using <cite>from cla_utils import *</cite>. To exit
416+
<a class="reference internal" href="cla_utils.html#module-cla_utils" title="cla_utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils</span></code></a> interactively using <cite>from cla_utils import *</cite>. To exit
417417
IPython type Ctrl-D.</p>
418418
<div class="proof proof-type-task" id="id10">
419419

@@ -423,7 +423,7 @@ <h2><span class="section-number">1.7. </span>Running your work<a class="headerli
423423
</div><div class="proof-content">
424424
<p>Briefly read this <a class="reference external" href="https://object-oriented-python.github.io/2_programs_in_files.html#ipython">Information about IPython</a>.</p>
425425
</div></div><p>If you also import <cite>numpy</cite> then you can create
426-
example <cite>numpy</cite> arrays and pass them to <code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils</span></code> functions to try
426+
example <cite>numpy</cite> arrays and pass them to <a class="reference internal" href="cla_utils.html#module-cla_utils" title="cla_utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils</span></code></a> functions to try
427427
them out. You can also do this in a script, e.g.:</p>
428428
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">cla_utils</span> <span class="kn">import</span> <span class="o">*</span>
429429
<span class="kn">from</span> <span class="nn">numpy</span> <span class="kn">import</span> <span class="o">*</span>
@@ -491,8 +491,7 @@ <h2><span class="section-number">1.9. </span>Coding style and commenting<a class
491491
editor modes which can help you with this. The skeleton implementation
492492
follows PEP8 quite closely. You are encouraged, especially if you are
493493
a more experienced programmer, to follow PEP8 in your
494-
implementation. However nobody is going to lose marks for PEP8
495-
failures.</p>
494+
implementation. Full code marks will require PEP8 compliance.</p>
496495
</section>
497496
<section id="skeleton-code-documentation">
498497
<h2><span class="section-number">1.10. </span>Skeleton code documentation<a class="headerlink" href="#skeleton-code-documentation" title="Permalink to this heading"></a></h2>

L1_preliminaries.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ <h3><span class="section-number">2.1.1. </span>Your first programming exercises<
193193
available when you import <a class="reference external" href="https://numpy.org/doc/stable/reference/index.html#module-numpy" title="(in NumPy v1.26)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy</span></code></a> itself. There is one exception,
194194
which is that <code class="xref py py-meth docutils literal notranslate"><span class="pre">numpy.linalg.norm()</span></code> is quite useful, but also covers a lot
195195
of different cases which are not very edifying to replicate. Hence,
196-
we have included <code class="xref py py-meth docutils literal notranslate"><span class="pre">numpy.linalg.norm()</span></code> in the <code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils</span></code> package as
196+
we have included <code class="xref py py-meth docutils literal notranslate"><span class="pre">numpy.linalg.norm()</span></code> in the <a class="reference internal" href="cla_utils.html#module-cla_utils" title="cla_utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils</span></code></a> package as
197197
<code class="xref py py-meth docutils literal notranslate"><span class="pre">cla_utils.norm()</span></code>, should you wish to use it.</p>
198198
<div class="proof proof-type-exercise" id="id2">
199199
<span id="ex-basic-matvec"></span>
200200
<div class="proof-title">
201201
<span class="proof-type">Exercise 2.1</span>
202202

203203
</div><div class="proof-content">
204-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.basic_matvec()</span></code> function has been left
204+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises1.basic_matvec" title="cla_utils.exercises1.basic_matvec"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.basic_matvec()</span></code></a> function has been left
205205
unimplemented. To finish the function, add code so that it
206206
computes the matrix-vector product <span class="math notranslate nohighlight">\(b=Ax\)</span> from inputs <span class="math notranslate nohighlight">\(A\)</span> and <span class="math notranslate nohighlight">\(x\)</span>.
207207
In this first implementation, you should simply implement
@@ -230,7 +230,7 @@ <h3><span class="section-number">2.1.1. </span>Your first programming exercises<
230230
<span class="proof-type">Exercise 2.2</span>
231231

232232
</div><div class="proof-content">
233-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.column_matvec()</span></code> function has been
233+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises1.column_matvec" title="cla_utils.exercises1.column_matvec"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.column_matvec()</span></code></a> function has been
234234
left unimplemented. To finish the function, add code so that it
235235
computes the matrix-vector product <span class="math notranslate nohighlight">\(b=Ax\)</span> from inputs <span class="math notranslate nohighlight">\(A\)</span> and <span class="math notranslate nohighlight">\(x\)</span>.
236236
This second implementation should use the column-space formulation
@@ -255,7 +255,7 @@ <h3><span class="section-number">2.1.1. </span>Your first programming exercises<
255255
<span class="proof-type">Exercise 2.3</span>
256256

257257
</div><div class="proof-content">
258-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.time_matvecs()</span></code> function computes
258+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises1.time_matvecs" title="cla_utils.exercises1.time_matvecs"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.time_matvecs()</span></code></a> function computes
259259
the execution time for these two implementations for some example
260260
matrices and compares them with the built-in Numpy matrix-vector
261261
product. Run this function and examine the output. You should
@@ -380,7 +380,7 @@ <h2><span class="section-number">2.2. </span>Range, nullspace and rank<a class="
380380
<span class="proof-type">Exercise 2.11</span>
381381

382382
</div><div class="proof-content">
383-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.rank2()</span></code> function has been left
383+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises1.rank2" title="cla_utils.exercises1.rank2"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.rank2()</span></code></a> function has been left
384384
unimplemented. To finish the function, add code so that it
385385
computes the rank-2 matrix <span class="math notranslate nohighlight">\(A = u_1v_1^* + u_2v_2^*\)</span> from
386386
<span class="math notranslate nohighlight">\(u_1,u_2\in \mathbb{C}^m\)</span> and <span class="math notranslate nohighlight">\(v_1,v_2 \in \mathbb{C}^n\)</span>. As you
@@ -480,12 +480,12 @@ <h2><span class="section-number">2.3. </span>Invertibility and inverses<a class=
480480
m\)</span> identity matrix, and <span class="math notranslate nohighlight">\(u,v \in \mathbb{C}^m\)</span>, show that whenever
481481
<span class="math notranslate nohighlight">\(A\)</span> is invertible, the inverse is of the form <span class="math notranslate nohighlight">\(A^{-1} = I + \alpha uv^*\)</span>
482482
where <span class="math notranslate nohighlight">\(\alpha \in \mathbb{C}\)</span>, and calculate the form of <span class="math notranslate nohighlight">\(\alpha\)</span>.</p>
483-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.rank1pert_inv()</span></code> function has been
483+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises1.rank1pert_inv" title="cla_utils.exercises1.rank1pert_inv"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.rank1pert_inv()</span></code></a> function has been
484484
left unimplemented. To finish the function, add code so that it
485485
computes <span class="math notranslate nohighlight">\(A^{-1}\)</span> using your formula (and not any built-in matrix
486486
inversion routines). The test script <code class="docutils literal notranslate"><span class="pre">test_exercises1.py</span></code> in the
487487
<code class="docutils literal notranslate"><span class="pre">test</span></code> directory will also test this function.</p>
488-
<p>Add a function to <code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils.exercises1</span></code> that measures the
488+
<p>Add a function to <a class="reference internal" href="cla_utils.html#module-cla_utils.exercises1" title="cla_utils.exercises1"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils.exercises1</span></code></a> that measures the
489489
time to compute the inverse of <span class="math notranslate nohighlight">\(A\)</span> for an input matrix of size 400,
490490
and compare with the time to compute the inverse of <span class="math notranslate nohighlight">\(A\)</span> using the built-in
491491
inverse:</p>
@@ -543,7 +543,7 @@ <h2><span class="section-number">2.4. </span>Adjoints and Hermitian matrices<a c
543543
numbers to store), consider equivalently storing a real-valued
544544
<span class="math notranslate nohighlight">\(m\times m\)</span> array <span class="math notranslate nohighlight">\(\hat{A}\)</span> with <span class="math notranslate nohighlight">\(\hat{A}_{ij}=B_{ij}\)</span> for <span class="math notranslate nohighlight">\(i\geq j\)</span>
545545
and <span class="math notranslate nohighlight">\(\hat{A}_{ij}=C_{ij}\)</span> for <span class="math notranslate nohighlight">\(i&lt;j\)</span>.</p>
546-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.ABiC()</span></code> function has been left
546+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises1.ABiC" title="cla_utils.exercises1.ABiC"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises1.ABiC()</span></code></a> function has been left
547547
unimplemented. It should implement matrix vector multiplication
548548
<span class="math notranslate nohighlight">\(z=Ax\)</span>, returning the real and imaginary parts of <span class="math notranslate nohighlight">\(z\)</span>, given the
549549
real and imaginary parts of <span class="math notranslate nohighlight">\(x\)</span> as inputs, and given the real array
@@ -654,7 +654,7 @@ <h2><span class="section-number">2.6. </span>Orthogonal components of a vector<a
654654
<span class="proof-type">Exercise 2.20</span>
655655

656656
</div><div class="proof-content">
657-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises2.orthog_cpts()</span></code> function has been left
657+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises2.orthog_cpts" title="cla_utils.exercises2.orthog_cpts"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises2.orthog_cpts()</span></code></a> function has been left
658658
unimplemented. It should implement the above computation, returning
659659
<span class="math notranslate nohighlight">\(r\)</span> and the coefficients of the component of <span class="math notranslate nohighlight">\(v\)</span> in each
660660
orthonormal direction. The test script <code class="docutils literal notranslate"><span class="pre">test_exercises2.py</span></code> in
@@ -717,7 +717,7 @@ <h2><span class="section-number">2.7. </span>Unitary matrices<a class="headerlin
717717
to work when <span class="math notranslate nohighlight">\(Q\)</span> is not unitary or square). The test script
718718
<code class="docutils literal notranslate"><span class="pre">test_exercises2.py</span></code> in the <code class="docutils literal notranslate"><span class="pre">test</span></code> directory will test this
719719
function.</p>
720-
<p>Add a function to <code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils.exercises2</span></code> that measures the
720+
<p>Add a function to <a class="reference internal" href="cla_utils.html#module-cla_utils.exercises2" title="cla_utils.exercises2"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cla_utils.exercises2</span></code></a> that measures the
721721
time to solve <span class="math notranslate nohighlight">\(Qx=b\)</span> using <code class="docutils literal notranslate"><span class="pre">solveQ</span></code> for an input matrix of sizes 100,
722722
200, 400,
723723
and compare with the times to solve the equation using the general purpose
@@ -921,7 +921,7 @@ <h2><span class="section-number">2.10. </span>Constructing orthogonal projectors
921921
<span class="proof-type">Exercise 2.30</span>
922922

923923
</div><div class="proof-content">
924-
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises2.orthog_proj()</span></code> function has been left
924+
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises2.orthog_proj" title="cla_utils.exercises2.orthog_proj"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises2.orthog_proj()</span></code></a> function has been left
925925
unimplemented. Given an orthonormal set <span class="math notranslate nohighlight">\(q_1,q_2,\ldots,q_n\)</span>, it
926926
should provide the orthogonal projector <span class="math notranslate nohighlight">\(P\)</span>. The test script
927927
<code class="docutils literal notranslate"><span class="pre">test_exercises2.py</span></code> in the <code class="docutils literal notranslate"><span class="pre">test</span></code> directory will also test

0 commit comments

Comments
 (0)