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 the values, not just the shapes:
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.
One honesty note on the grid analogy: CSS Grid reflows. Change grid-template-columns and items visually rearrange to fill the new tracks. Reshape never rearranges. If you remember one thing, remember that reshape is line-wrapping, not layout.
Reshape a flat tensor into a matrix.