I'm trying to set an element of a Numpy array to be another Numpy array. I'm not sure on how to do this since every time I try I get ValueError: setting an array element with a sequence.
I know this is possible with Python's list since I can append the new array to list and it will work.
This is an example of what I'm trying to do:
import numpy as np
finalArray = np.zeros(3)
finalList = []
a = np.arange(128).reshape(32,4)
b = np.arange(124).reshape(31,4)
c = np.arange(120).reshape(30,4)
# This works
finalList.append(a)
finalList.append(b)
finalList.append(c)
# This doesn't work
finalArray[0] = a
finalArray[1] = b
finalArray[2] = c
Any ideas on how to do this?
a,b, andchave different shapes and I was hoping to have a numpy array filled with those.