I know that when we speak about an array having 1, 2, or 4 dimensions, we mean arrays like this:
1: [0]
2: [0,0]
3: [0,0,0]
4: [0,0,0,0]
...
Is the first 'axis' of an array the only thing that defines its dimensionality? Can an array with 4 dimensions be represented these ways?
[0, [0,0,0]]
[[0,0], [0,0]]
or does this fall under some other definition of dimensionality?
Another option is that a 4-dimensional array would be of the form
[ [[ [0,..],[0,..] ], [ [0,..],[0,..] ]], [[ [0,..],[0,..] ], [ [0,..],[0,..] ]], [[ [0,..],[0,..] ], [ [0,..],[0,..] ]], [[ [0,..],[0,..] ], [ [0,..],[0,..] ]] ]
e.g.
[
[
[ [0,..],[0,..] ],
[ [0,..],[0,..] ]
],
[
[ [0,..],[0,..] ],
[ [0,..],[0,..] ]
],
[
[ [0,..],[0,..] ],
[ [0,..],[0,..] ]
],
[
[ [0,..],[0,..] ],
[ [0,..],[0,..] ]
]
]
Is this just a nomenclature nuance that I'm bringing up? Is this definition relative to the field in which we are discussing (computation vs. physical systems)?
(the thoughts came from this question.)
[0, [0,0,0]]
and[[0,0], [0,0]]
) look like jagged arrays - basically, an array of arrays of any size (msdn.microsoft.com/en-us/library/2s05feca.aspx)