I have a 3D array and I would like to obtain a 2D image along X-Y with the maximum value of z at each point and save it as a numpy array.
import numpy as num
matrix=num.load('3d')
nx,ny,nz=num.shape(matrix)
CXY=num.zeros([ny, nx])
    for i in range(ny):
        for j in range(nx):
            CXY[i,j]=num.max(matrix[j,i,:])
The problem is to save the obtained matrix. I would like to save it with numpy.save but I always get an empty array. Does anyone have suggestions to properly save the obtained array?
I just used num.save:
num.save('max', CXY[i,j])


CXJ, notCXJ[i,j].