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, so that the conventions do not get in the way of reading it.
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 you would read or type 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 your own case, such as an array of shape
(n_runs, n_params). Constant width bold- A command to type yourself, as it stands, such as
pip install torch numpy. - Mathematics
- Formulas are typeset as in a book: variables in italic (, ), names and operators upright (, ).
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; open it with the row’s +. 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, the 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. The project of Unit 4 lists the packages: Python 3.10 or later and pip install torch numpy scipy scikit-learn (PyTorch 2, 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
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 you will be able to do after it, then lists its lessons. A lesson starts with its idea in one line and the lessons it builds on, and ends with two rows: Check yourself, with what the lesson promised, a few questions, then exercises that change a listing and give the measured answer behind Show the answer, and Go further, with outside reading and the papers on this site it prepares you for. The last lesson of a unit closes with a short summary of the unit. The course itself starts at what a surrogate is.