returns a numpy array created from the list that was closed last (if `n`=-1).
        If `n` is None, the lists of the current level are returned as an array.
        Other lists in the current level can also be accessed with `n` as the specific index.

def array(self,n=-1):
        """returns a numpy array created from the list that was closed last (if `n`=-1).
        If `n` is None, the lists of the current level are returned as an array.
        Other lists in the current level can also be accessed with `n` as the specific index.
        """
        if n is None:
            return np.array(self.list)
        return np.array(self.list)[n]