title: Appending 3d array into 4d array, the 4th dimension being number of 3D arrays
body: <p>In the process of MRI image analysis, I would like to "mask" a time-series image as a part of pre-processing. Time-series Images are 4D (the 4th dimension is time at which the image was taken- x,y,z,t). Since my mask is a 3D array (x,y,z) I would like to duplicate 3D for all time-series images so that I can mask the 4D array without any problem regarding different size. <code>numpy.ma</code> can not broadcast what I have in mind and I always get the error of size differences. So is duplicating a 3d array to 4d array efficient? Do you think I can perform another efficient way without doing this? </p>