(self, cards_1d)
return cards_2d
Args:
            cards_1d (iterable):   list or array of ints. NOT A SINGLE INT!

        Returns:
            2D array of ints representing the cards in 2D format
Args:
            cards_1d (iterable):   list or array of ints. NOT A SINGLE INT!
Args : cards_1d ( iterable ) : list or array of ints . NOT A SINGLE INT!
def get_2d_cards(self, cards_1d):
        """
        Args:
            cards_1d (iterable):   list or array of ints. NOT A SINGLE INT!

        Returns:
            2D array of ints representing the cards in 2D format
        """

        if len(cards_1d.shape) == 0 or cards_1d.shape[0] == 0:
            return np.array([], dtype=np.int8)

        aa = np.copy(cards_1d)
        aa[aa == Poker.CARD_NOT_DEALT_TOKEN_1D] = 0  # for robustness against not-dealt tokens
        cards_2d = np.copy(self.LUT_1DCARD_2_2DCARD[aa]).reshape(-1, 2)
        cards_2d[np.where(cards_1d == Poker.CARD_NOT_DEALT_TOKEN_1D)] = Poker.CARD_NOT_DEALT_TOKEN_2D.reshape(2)
        return cards_2d
def get_2d_cards ( self , cards_1d ) : if len ( cards_1d . shape ) == 0 or cards_1d . shape [ 0 ] == 0 : return np . array ( [ ] , dtype = np . int8 ) aa = np . copy ( cards_1d ) aa [ aa == Poker . CARD_NOT_DEALT_TOKEN_1D ] = 0 # for robustness against not-dealt tokens cards_2d = np . copy ( self . LUT_1DCARD_2_2DCARD [ aa ] ) . reshape ( - 1 , 2 ) cards_2d [ np . where ( cards_1d == Poker . CARD_NOT_DEALT_TOKEN_1D ) ] = Poker . CARD_NOT_DEALT_TOKEN_2D . reshape ( 2 ) return cards_2d