Remix.run Logo
srean 3 hours ago

> A tensor is nothing but a flat array of numbers, plus some metadata telling you how to interpret those numbers as a multi-dimensional object.

Erm... many would disagree. I think what he means is just a multidimensional array.

zserge 3 hours ago | parent [-]

Not in a general mathematical sense, of course. Rather carthesian tensors. Seems like for most libraries it's `numpy.ndarray`: https://docs.tinygrad.org/tensor/ or https://docs.pytorch.org/docs/main/tensors.html

srean 3 hours ago | parent [-]

To add to the confusion, Mathematicians and Physicists often disagree on what that word means. A Physicist's tensor is often a mathematicians tensor field.

An appropriate tensor can certainly be represented by a multidimensional array but not all multidimensional arrays are tensors. It depends on how that multidimensional array participates with others.

For example, (lat, long) is not a 2d vector although it can be represented as a 2 dimensional array.