Shaped values
Read rectangular exact data, then choose an advanced numerical representation if needed.
Orientation
Shaped values store rectangular data without implying matrix or tensor algebra. The shape comes after {: and semicolons separate rows; shaped locators are one-based tuples.
Start with the small exact grid. Sparse coordinates and Float tensors in the advanced section need separate numerical choices.
A worked example
The final line is the displayed value; the earlier lines set up the experiment. Keep the setup visible so you can tell whether a name, a cell, or a collection is being reused when the expression changes.
Read the result
Try a slice such as grid[1:2, 2]; shaped views retain their selected axes. Matrix algebra requires an explicit /Matrix/ header or grid ~!: :Matrix; mathematical vectors and tensors additionally need Frames from the linalg plugin.
Change one grid entry and verify a one-based lookup before loading any plugin.
Advanced: choose the numerical representation deliberately
This section is optional after the first worked grid. Continue to Exact inventory for a beginner collection task. Prerequisites for the following examples: Arrays and exact fractions. Loading a bundled plugin is supported in this browser; these examples need no files, network access, or worker. A shaped value describes storage axes. Coordinate Frames, tensor contractions, and sparse coordinate algebra are taught in the linear algebra plugin tutorial.
An exact sparse matrix stores only its nonzero entries. Here a thousand-coordinate matrix applied to a thousand-coordinate vector produces one nonzero value, 2:
This does not allocate a million dense cells. .Apply and .MatMul require finite, compatible axes and bounded support-pair work. Use sparse output directly; dense expansion is a separate choice with its own size cost.
Float tensors instead use binary32 or binary64 approximate arithmetic. Every multiply and accumulation is rounded to the selected format. Even an exactly representable result retains the approximate label:
The displayed cells are Float values 17 and 39, not exact Integer cells. The adapter limits tensors to 262144 cells, rank 16, and multiplication to 4194304 scalar products. Shapes and formats must agree. An oversized request fails; it does not silently truncate or produce a certificate. See the Float tutorial for rounding and diagnostics.
Private typed storage cannot be sent directly through the worker value protocol. Convert it with .float.ToShaped before transfer and reconstruct it in the receiving runtime. An ordinary shaped table is also a useful static alternative when an interactive sheet host is unavailable.