I have an array with the next distribution
array -> shape(878,)
one element inside array
shape(313,313,3)
What I have to do to get the next result?
shape(878,313,313,3)
thanks
Is it an array or a dictionary. But even if you want to change the size , you could directly use np.reshape() for this operation but if you want ot change it in some different way, here is a way:
x = np.zeros((array.size,313,313,3)) # you could replace the numbers with shape of elements
for i in range(array.size):
x[i] = a[i]
x = np.array([]) and then reassign to x with x = np.zeros((array.size,313,313,3))? :p
object? There are a few ways you could have constructed a 1-D array of length 878 containing arrays, but typically they'd involve a mistake of sizing.