
Dr. Farah analyzes the dimensional structure of the incoming data.
ARCHIMEDES SENSOR LOG · STREAM 7-G · Repeating structure detected at two distinct scales. Dimensional layout: unresolved. ARIA parse status: failed, 4,096 of 4,096 rules.
That log line is the most interesting thing on this ship. The stream isn't a wall of numbers; it has structure. Before we analyze anything, I want to know its dimensional layout.
Every has a : a tuple of numbers describing how many elements exist along each . If you've ever checked array.length or calculated rows × cols for a grid layout, you already think in shapes.
In frontend development, you work with shapes constantly. A responsive grid with 3 rows and 4 columns? That's shape [3, 4]. A list of 10 user cards? Shape [10]. A of 32 RGB images at 224×224 pixels? Shape [32, 224, 224, 3].
Here's the question that actually trips people up: not what the new shape is, but which value ends up where. The answer: tensors fill row by row ( order). Watch where each value lands:
The golden rule: reshaping never changes the data or its order, only where the line breaks fall. The memory stays one flat , exactly like the Float32Array from lesson 1; shape is just the reading instructions.
Here is that rule with the stakes attached. Farah's layout hunt has produced a candidate grid for the first stretch of the stream: [450, 64], 450 readings by 64 channels, 28,800 values. The channel plotter wants channels as rows, shape [64, 450], and Demir reaches for the tool he learned four paragraphs ago.
On a real sensor block the failure is quieter and worse: any per-channel structure dissolves, the plotter draws sixty-four confident-looking traces of interleaved junk, and nothing throws, because the element count checks out. This is also exactly where the CSS Grid instinct betrays you. Change grid-template-columns and the browser reflows, moving items into the new tracks; that reflow is what reshape never does. Reshape rewraps the flat line. When you catch yourself wanting the values rearranged, the tool is transpose.
Reshape a flat tensor into a matrix.