I am trying to create an numpy array(lets say A) of shape (a, b, 1, d) where d is unknown and changes according to the input I have. I have another array (lets say B) with shape (a, b, 1, 1). I want to append the values of B to A from the for loop. In matlab it can be easily done with:
a = zeros(a, b, 1, 1)
count = 0
for i = 1 : something
ai = array of shape (a, b, 1, 1)
count += 1
a(:, :, 1, count) = ai
end
How can I achieve similar result in python ?
somethingknown at runtime?