November 3, 2025
Tensor tantrums, served hot
Draw high dimensional tensors as a matrix of matrices
Grid-of-grids for 4D data ignites fight: old news, MATLAB did it, PyTorch please
TLDR: A blogger shows a neat way to visualize high‑dimensional data as nested grids. The crowd splits between “old news,” “add it to PyTorch,” and “MATLAB already has it,” with extra bickering over dimension names — proving visual tools matter most when they’re easy and built‑in.
A new post on ezyang’s blog proposes a simple-but-clever way to show super-high‑dimensional data: draw it as a grid of grids, stacking left‑to‑right, then top‑to‑bottom, so every extra dimension becomes another tidy block. It even nods to a famous space‑filling path (think “zigzag that hits every spot”), but without the math lecture. Clean, visual, teachable. What could go wrong? The comments, of course. The top vibe is split: one camp yawns that it’s nothing new, with IAmBroom calling it “pretty standard.” Another camp yells ship it, asking why this isn’t already a built‑in view in PyTorch. Then the classic: “MATLAB did this,” claims a third commenter, dropping the eternal engineers’ mic. Bonus drama: a pedant duel over whether you can “split along dimension 0,” with one reader insisting, basically, that “zero isn’t a real dimension” — cue eye rolls and geometry déjà vu. The joke brigade showed up too, dubbing it “fractal spreadsheets” and “4D sudoku for robots.” Underneath the snark, a real theme: people want clearer ways to see their data, and they want it in the tools they already use. The internet verdict? Nice idea — now make it a button.
Key Points
- •Proposes visualizing high-dimensional tensors as a matrix of matrices to make dimensions easily identifiable.
- •Construction rule: alternate horizontal and vertical stacking for each added dimension, starting with horizontal to follow row-major order.
- •Provides PyTorch examples from 0D through 5D using torch.arange and view to illustrate the layout.
- •Explains how higher dimensions correspond to skipping over blocks, with a 4D example contrasting rows on different dims.
- •Notes the special case where all sizes are 2 aligns with the Morton (Z-order) curve and includes a knowledge check using torch.split.