Next code is matlab code. I want to convert this code into python code in order to use it in Arcgis.
vals = zeros(size(a(:,:,1)));
[~,indexOfMax] = max(a,[],3);
for i=1:size(a,1)
for j=1:size(a,2)
vals(i,j) = b(i,j, indexOfMax(i,j));
end
end
I'll explain briefly explain this code. I have two images (named A and B). Both have 7 layers at the same dimension (4169,6289,7). First I'd like to find the location of max value in A image and then get the value of B image at the location of max value which extracted from A image in previous step.
Thanks a lot
scipyat scipy.org/NumPy_for_Matlab_Users