I want to create a 3d numpy array form 2d numpy array using for loop.I tried in many different methods to create 3d arrays from 2d but each time its giving me errors. This is what I have done, the end array should have a dimension of (10,3,3).
#this is a sample code
arr=[]
for i in range(10):
a=np.random.rand(3,3)
arr=np.stack(a,arr)
#arr=np.append(arr,a)
#arr=np.array([arr,a])
#arr[i]=a