# "row" and "column" are the names of axes of 2d array, is there a similar naming for a 3d array?

row and column are the names of axes of 2d array.

this python array,

array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])


could be viewed as a matrix that has 3 rows and 3 columns.

first row is [0, 1, 2], first column is [0, 3, 6].

Is there a similar naming for a 3d array?

array([[[ 0,  1],
[ 2,  3],
[ 4,  5]],

[[ 6,  7],
[ 8,  9],
[10, 11]],

[[12, 13],
[14, 15],
[16, 17]]])

• I've used row, column, page informally. I don't think there's a standard. Commented Aug 24, 2019 at 0:04
• Some people at reddit say it could be called 'slices' (and they were referring to MRI). Commented Aug 24, 2019 at 5:56
• By far the best known term, due to its popularity in spreadsheet software, is "sheet."
– whuber
Commented Apr 19, 2021 at 17:01

Such arrays are sometimes called tensors, although you can see there are other definitions that become more relevant in general relativity and abstract algebra. Specifically in the literature on tensor decomposition we find a more specialized lexicon.

For a 3-mode tensor (analogous to 3d array) there are special names:

• Mode 1: columns
• Mode 2: rows
• Mode 3: tubes

The following diagram from Kolda and Bader 2009 is quite clarifying.

But since such tensors are often $$n$$-modal it is desirable to have the terminology of a mode-$$k$$ fiber for the $$k$$th mode of the tensor.

We can access the ith, jth tube in the example array given as follows:

import numpy as np

X = np.array([[[ 0,  1],
[ 2,  3],
[ 4,  5]],

[[ 6,  7],
[ 8,  9],
[10, 11]],

[[12, 13],
[14, 15],
[16, 17]]])

# Let us pick (i,j) = (0,1)
i = 0
j = 1

print(X[i,j,:])


As far as I know, there’s no single name for them. Usually with multi-dimensional data, the dimensions have particular meaning, e.g. the third dimension could be time in time-series, or RGB channels for pictures, use those for naming them.

Rows and columns are popular with tabular data, but for same reason as above, it is usually more informative to talk about samples in rows and features in columns, especially since different software may use different defaults for them, e.g. Python’s Numpy by default assumes samples in columns and features in rows.