Sparse argmax implementation in label.py revised