Giving Measurements a Place

Three thermometers give us three readings. Before we can calculate with them, we need to decide how those readings are stored, which position belongs to which thermometer, and what an operation should do to the collection.

10 sections · 5 questions · 2 coding challenges

1 / 10

When One Calculation Needed to Work on Many Measurements

BOTIE

Scientific programs often repeat the same operation on long collections of measurements. Writing a separate instruction for every reading makes the program harder to inspect, while writing a Python loop for every numerical operation can add overhead.

The NumPy authors' 2020 account describes an array model that combines compact expressions with compiled numerical operations. The useful idea for us is simple: organise the readings once, then express a calculation for the collection. Our greenhouse readings are invented, not measurements from that paper.

Sources for this history