**New course!**Every coder should learn

**Generative AI!**

0

# I can't imagine what 4D arrays, or above look like, can anyone explain this to me?

I understand that a 2D array would be a table, with rows and columns, and a 3D array would be the same but with slices, like a block. Please correct me if I'm wrong. But can someone please explain how 4D or higher arrays work, and what it would be used for?

2 Answers

+ 6

you can think of a macro system so 3rd dim is a cube. 4th is a row of cubes, 5 is a layer of cubes. 6 is a cube of cubes. 7 is a row of cubes of cubes and so on.

0

they are used in machine learning where you would have as many dimensions as you have metrics to correlate, for example.