def get_uid(self, idx):
        """
        Return the `uid` of the elements with the given `idx`

        :param list, matrix idx: external indices
        :type idx: list, matrix
        :return: a matrix of uid
        """
        assert idx is not None

        if isinstance(idx, (int, float, str)):
            return self.uid[idx]

        ret = []
        for i in idx:
            tmp = self.uid.get(i, None)
            assert tmp is not None, (
                'Model <{}> does not have element <{}>'.format(self._name, i))
            ret.append(self.uid[i])

        return ret
def get_uid ( self , idx ) : assert idx is not None if isinstance ( idx , ( int , float , str ) ) : return self . uid [ idx ] ret = [ ] for i in idx : tmp = self . uid . get ( i , None ) assert tmp is not None , ( 'Model <{}> does not have element <{}>' . format ( self . _name , i ) ) ret . append ( self . uid [ i ] ) return ret
Return the `uid` of the elements with the given `idx`

        :param list, matrix idx: external indices
        :type idx: list, matrix
        :return: a matrix of uid