Project DelphiTensors Workshop

Tensor

Tensor — an array of numbers with any number of axes. Spanish: tensor. A colour image is one.

The ladder runs: a scalar has shape () and order 0; a vector has shape (3,) and order 1; a matrix has shape (2, 2) and order 2; and np.random.randn(2, 3, 4) has shape (2, 3, 4) and order 3. Nothing about the idea changes as you climb it — only how many numbers the shape tuple holds.