How to create 3D (3 dimensional) array in numpy Python. In this video we will talk about how to create three dimensional arrays in module numpy Python.
==================================
NumPy Module Tutorial Playlist for Machine Learning:
==================================
https://youtube.com/playlist?list=PLGZqdNxqKzfYVbCaAKTPHVjz-VjQtBzbl
==================================
Source Code:
==================================
import numpy as np
A=np.array([
[2,-3,1],
[2,0,-1],
[1,4,5]
])
print(A.shape)
print(A.ndim)
print("=======================")
B=np.array([
[[1,2,3],
[4,5,6]],
[[7,8,9],
[10,11,12]]
])
print(B.shape)
print(B.ndim)