Situation
I assumed this would be easy - but turns out there are a few restrictions. I have an empty array, that at this point, is empty and has unknown dimensions.
mainArray = np.array([])
later on, I want to append arrays to my main array, which are of different lengths.
I have tried
*Please assume all arrays I have attempted to append are the result of np.zeros(n)
I have tried np.append() but this does not maintain the correct dimensions (assumes I want a linear array).
I have tried np.concatenate() however, this error
TypeError: only length-1 arrays can be converted to Python scalars
implies I cannot concatenate to an empty array...?
I have tried np.vstack() but get
ValueError: all the input array dimensions except for the concatenation axis must match exactly
...which implies I cannot have added arrays of different lengths?
Question
How can I append n-length arrays to an empty n-dimensional array?
update
Here is an example of an output:
[[0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0]]
Where length of 3 is a variable
[[0,0,0,0,0,1,1],[0,0,0,0,0,0,0],[0,0,0,1,1,1,1]]with1as padding.