Which axis to combine 3d arrays of voxel level activity across multiple participants?

Good morning. I have run RSA analyses on 9 participants and have since extracted the results into 9 3d arrays. I’d like to run t-tests on the fisher transformed spearman correlations for each voxel across the 9 subjects.

I know how to do all of these things; however, what I am not confident on is what axes I am supposed to combine the 3-d arrays on.

In my head it would be something like numpys dstack as follows in the toy example. However, when I run the t-tests on the created 3d array it turns 2d, which I imagine will cause down stream effects of plotting the t values on a brain.

The root of the problem is certainly my misunderstanding of the content of the arrays created by the RSAtoolbox library, so any help on the idea of which axis to combine the arrays on would be incredibly helpful!

That code is as follows:

#create 3 toy 3d arrays
a = np.array([[[1,2,3,4], [5,6,7,8], [5,6,7,8]]])
b = np.array([[[1,2,3,4], [5,6,7,8], [5,6,7,8]]])
c = np.array([[[1,2,3,4], [5,6,7,8], [5,6,7,8]]])

#combine the 3 toy arrays, each array should repeat the 4 digit number sequence 3 times.
test = np.dstack((a,b,c))
print("Shape of 3 toy subject 3d array: ", test.shape)t