Tensors
A tensor is a multi-dimensional array of components that are spatial coordinates. Tensors are used extensively in physics and biological studies in topics such as electromagnetism and diffusion tensor imaging. William Rowan Hamilton was the first to come up with the term tensor. Tensors play a basic role in abstract algebra and algebraic topology.
The tensor order is the sum of the order of its arguments, plus the order of the result tensor. For example, an inertia matrix is a second-order tensor. Spinors are also multi-dimensional arrays, but the values of their elements change via coordinate transformations.
The initialization of a tensor is shown here. The array is initialized with integer values ranging from 0 to 3:
var array ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access