you can try to understand a more simple 5 dimensions example:
print(np.zeros( (1, 2, 1, 2, 2)))
output:
[[[[[0. 0.]
[0. 0.]]]
[[[0. 0.]
[0. 0.]]]]]
in this example, you can see that you have 1 element of 5th dimension, which contains 2 elements of 4th dimension which each of them contains a 1 element of 3rd dimension which contains 2 elements of 2nd dimension which each of them contains 2 elements of 1st dimension:
[<== your array
5th.1[<=== your 5th dimention, only 1 element of 5th dimention
5th.1.4th.1[<=== your 4th dimention, 1st element of 4th dimention
5th.1.4th.1.3th.1[<=== your 3rd dimention, only 1 element of 3rd dimention
5th.1.4th.1.3th.1.2ed.1[<=== your 2ed dimention, 1st element of 2ed dimention,
inside of this element are those elements of 1st dimention,
there are 2 elements of 1st dimention:
0.0, 0.0],
5th.1.4th.1.3th.1.2ed.2[<=== your 2ed dimention, 2end element of 2ed dimention,
inside of this element are those elements of 1st dimention,
there are 2 elements of 1st dimention:
0.0, 0.0]]],
5th.1.4th.2[<=== your 4th dimention, 2end element of 4th dimention
5th.1.4th.2.3th.1[<=== your 3rd dimention, only 1 element of 3rd dimention
5th.1.4th.2.3th.1.2ed.1[<=== your 2ed dimention, 1st element of 2ed dimention,
inside of this element are those elements of 1st dimention,
there are 2 element of 1st dimention:
0.0, 0.0],
5th.1.4th.2.3th.1.2ed.2[<=== your 2ed dimention, 2end element of 2ed dimention,
inside of this element are those elements of 1st dimention,
there are 2 elements of 1st dimention:
0.0, 0.0]]]]
for simplicity:
[1 X [2 x [1 x [[0.0, 0.0],
[0.0., 0.0]]]]]
you have to keep in mind that (4,)+(512,1024,3)+(3,) = (4, 512, 1024, 3, 3)
, they used 3 tuples to evidentiate:
- the number of images (4),
- the hight (512), the width(1024) and depth(3),
- the number of channels(3)
similar in your example for np.zeros(((4,)+(512,1024,3)+(3,)))
you can simplify as:
[4 X [512 X [1024 X [[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0]]]]]