Seems like a very good idea but maks.any(i) returns a ndim-1 array and argmax() is most of the time bigger than the dimension that is verified. Cant seem to make it work properly.