Lead StoryFerro · 9 min

A tensor is a shape, some strides, and a pointer

Every machine learning library is built on one data structure. Here is what a tensor actually is, why it is mostly a description rather than data, and how that one idea makes transposing a matrix cost nothing.

Karthik Rajkumar
Read the story17 October 2026

Latest

On the Desk

Ferro·6 min read

Warnings as errors, and a Miri job with nothing to check

The last piece of Ferro's groundwork was to turn on every check available, set them all to fail the build, and configure a tool that detects bugs in a category of code the project does not contain…

Karthik Rajkumar·28 September 2026
Ferro·6 min read

Automation in the language you're already using

Every project accumulates tasks that are not building the project. Regenerate the test data. Run all the checks the way the build server runs them. Generate some repetitive code. Format everything.…

Karthik Rajkumar·28 September 2026
Ferro·6 min read

Error messages you'll read more than the docs

The first piece of real logic written for Ferro was the error type. Not the tensor, not any arithmetic — the thing that explains what went wrong. That ordering is deliberate, and the reasoning is…

Karthik Rajkumar·28 September 2026
Ferro·9 min read

Reading a file format in 300 lines

Ferro tests itself against reference data generated by NumPy, which means something has to read NumPy's file format. That format is called .npy , and writing a reader for it is the first real code in…

Karthik Rajkumar·28 September 2026
Ferro·6 min read

NumPy as the oracle

Here is a question with a genuinely uncomfortable answer. You have just written the function that multiplies two matrices. It runs. It returns a grid of numbers. How do you know they are the right…

Karthik Rajkumar·27 September 2026