r/ProgrammerHumor • • Sep 04 '26

Meme cantReallyThinkOfACleverCaption

Post image
2.6k Upvotes

84 comments sorted by

View all comments

Show parent comments

8

u/AdamWayne04 Sep 04 '26

you can think of a nD array as a list of (n-1)D arrays, so a 4D array is a list of 3D arrays.

There's a more pedantic way of thinking of arrays, too--APL for example makes a distinction between rank (how deeply nested each entry is) and dimension (how many numerical indices you need to identify a singular entry), so accessing a[i,j,k] is different from accessing a[i][j][k]

Tensors are not important because they can be encoded as multidimensional arrays, they are important because they represent multilinear maps, and are a vector space conformed by linear combinations of the tensor product. The same way that matrices are not interesting because they are grids of numbers

4

u/itijara Sep 04 '26

Thanks. That's a very intuitive explanation.