Conventions used in this course

How a lesson is set: numbered examples, equations, figures and tables, the kinds of set-apart element, and what italic and constant width mean.

The course is set like a technical book. Its nine units are the chapters, and each lesson is numbered within its unit: lesson 3.1 is the first lesson of unit 3. This page explains how a lesson is set.

Typographical conventions

Italic
A new term, where it is first used and explained, such as full-field surrogate or Latin hypercube. Italic also marks emphasis.
Constant width
Program listings, and in the prose anything read or typed in code: functions and methods (np.polyfit), arguments (deg=2), variables and arrays (X, Y), and file names and extensions (.npz, d3plot).
Constant width italic
A placeholder for a value from the reader’s own case, such as an array of shape (n_runs, n_params).
Constant width bold
A command to type as it stands, such as pip install torch numpy.
Mathematics
Formulas are typeset as in a book: variables in italic (CpC_p, α\alpha), names and operators upright (Re\mathrm{Re}, log⁡\log).

Numbered elements

Program listings (Examples), displayed equations, figures and tables are numbered within their unit, in the order they appear in the course. The first listing of unit 2 is Example 2-1, and its second displayed equation is Equation 2-2. The number uses a hyphen, so it cannot be confused with a lesson number such as 2.1. An equation’s number stands in parentheses at the right of the formula.

A reference to a numbered element is a link. Equation 2-2, for example, jumps to the lift coefficient as a sum over the surface panels, and Example 2-1 to the listing that computes it, on its own lesson’s page.

Each listing has a caption with its number and title, Python coloured by kind of token, and numbered callouts: a number in a disc at the end of a line, explained under the listing. The Copy button copies the code without the markers. A listing longer than 15 lines is folded into one row that shows its caption, so the text reads through; the row’s + opens it. Other rows marked + hold a detour or a list of questions that most readers can pass over.

Example and table captions sit above the element, figure captions below it.

What a listing prints is quoted in the text after it. Output longer than a short value is set inside the listing’s fold, under the callouts, in constant width with a rule at its left, as Example 2-1 would show its one line:

CL = 0.775

Using the code examples

From Unit 2 on, most listings run on aircraft-runs.npz, 56 solver runs of the aircraft with 2,000 surface points each, through aircraft.py: Example 2-2 starts that file, and later listings add functions to it and import from it. From runs to arrays lists the packages: Python 3.10 or later and pip install torch numpy scipy scikit-learn (PyTorch 2, SciPy 1.15, scikit-learn 1.4 or later). Two listings of Unit 5 also import PyTorch Geometric and neuraloperator.

A number quoted after a listing is what the listing printed when it was run for this course. Listings with random numbers mostly fix their seed, so they print the same numbers on another run, though the last digits can differ between machines and library versions. Timings depend on the machine.

Set-apart elements

Prose carries each lesson. A lesson sets apart at most two short elements, never two of the same kind, and a short lesson none. A term the lesson relies on gets one definition, set in the text:

DefinitionTerm

This element gives the one exact statement of a term that the rest of the lesson leans on.

Three kinds of element are set apart from the prose, each with its own colour and label:

A tip is something to apply:

A warning is the only element with a box:

A longer aside that the lesson does not depend on is a sidebar, at most one in a unit:

How a unit is set

Each unit’s page opens with what the unit covers and what the reader can do after it, then lists its lessons. A lesson starts with its idea in one line, its outcome and the lessons it builds on. It ends with Check yourself (a few questions), Exercises (numbered by unit, most changing a listing, with the measured answer under Answer) and Go further (outside reading and related papers on this site). The course itself starts at what a surrogate is.

← The course