Solved by albanD in post #2 
              
              
                Hi, 
Yes we couldn’t overload the [] operator to do  be the same as in python. You can check the doc for the corresponding c++ API. I think category.index({sample}); in this case.