Put the Same Readings Into the Right Arrangement

A sensor may send one long sequence while a calculation expects rows. We need to change the arrangement without changing which measurements belong to each day and greenhouse.

10 sections · 4 questions · 2 coding challenges

1 / 10

Separating Stored Order From the Shape of a Calculation

BOTIE

Scientific instruments and file formats often deliver observations in a flat sequence. Numerical calculations need arrangements that identify time, location, and measurement channels.

NumPy's manipulation routines describe shape and axis changes explicitly. This makes array-oriented calculations possible without treating every change of layout as a new measurement. The documented distinction between reshape, transpose, and joining is the mechanism we use here.

Sources for this history