Oh boy, thanks for the suggestion! I was initially creating an array with all elements initialised to ``i``. XNOR with the ``labeled_im`` helps identify equal elements, in the sense whenever the elements in ``labeled_im`` are equal to ``i``. But, I guess that's the beauty of python! :+1: