I encounter some problems, when implementing an argmax function. Here is an MVCE (link to v1 playground):
argmax
fn