python 3d array

Solutions on MaxInterview for python 3d array by the best coders in the world

showing results for - "python 3d array"
Finnian
11 Nov 2018
1Explaination:
2	import numpy as np
3
4	np.zeros(the amount of arrays, amount of rows, the amount of colums)
5---------------------------------------------------------------------
6Usage:
7	array_city = np.zeros((2, 3, 4))
8	print(array_city)
9---------------------------------------------------------------------
10Results:
11[
12    [
13      [0. 0. 0. 0.],
14  	  [0. 0. 0. 0.],
15      [0. 0. 0. 0.],
16    ],
17      
18    [
19      [0. 0. 0. 0.],
20      [0. 0. 0. 0.],
21      [0. 0. 0. 0.],
22    ]
23]
24
Emilie
14 Jan 2019
1
2  import numpy as np
3
4arr = np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 
5  9], [10, 11, 12]]])
6
7
8