testMat1 = np.array([[1,2,3,4],[4,5,6,7]])
testMat2 = np.array([[7,8,9,10],[10,11,12,13]])
testMat3 = np.array([[2,4,6,8],[3,5,7,9]])
Here are three matrices of shape (2, 4)
How do I combine them into a multidimensional array with shape (3, 2, 4)?
np.array([testMat1, testMat2, testMat3]) works properly, however this is not
what I am looking for because I will be continuously adding more matrices to
the array. I need a way to append new matrices
to the array. I tried using np.append but it doesn't seem to be meant for this purpose.
np.array(alist)repeated as the list grows, and doing the repeated concatenate. Another way is to initial the array to full size, and "insert" the new arrays as they become available, doing your calcs on the appropriate slice.