Solved by spacemeerkat in post #2 
              
              
                Not sure if this is the best way to solve the problem but one can do it recursively: 
max_vals = a.max(1)[0].max(1)[0].max(1)[0]