Solved by davidweb in post #2 
              
              
                Well, sometimes it helps to just approach the problem again after you explained it to others… Here is the solution I got the problem solved with: 
# make a copy of the original activation_map
nact = act.copy()

#Reshape the activation map to a 1D Matrix / Array
nact = nact.reshape(-1)

#Get the indi…