def _index2n ( self , index ) : n_float = np . sqrt ( index + 1 ) - 1 n_int = int ( n_float ) if n_int == n_float : n = n_int else : n = n_int + 1 return n
does indexing return a string or an int python
def _index2n(self, index):
        """

        :param index: index convention
        :return: n
        """
        n_float = np.sqrt(index + 1) - 1
        n_int = int(n_float)
        if n_int == n_float:
            n = n_int
        else:
            n = n_int + 1
        return n