Answers for "python 3d array"

1

python 3d array

Explaination:
	import numpy as np

	np.zeros(the amount of arrays, amount of rows, the amount of colums)
---------------------------------------------------------------------
Usage:
	array_city = np.zeros((2, 3, 4))
	print(array_city)
---------------------------------------------------------------------
Results:
[
    [
      [0. 0. 0. 0.],
  	  [0. 0. 0. 0.],
      [0. 0. 0. 0.],
    ],
      
    [
      [0. 0. 0. 0.],
      [0. 0. 0. 0.],
      [0. 0. 0. 0.],
    ]
]
Posted by: Guest on February-24-2021
0

python 3d array

import numpy as np

arr = np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 
  9], [10, 11, 12]]])
Posted by: Guest on September-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language