(self, cards_2d)
return np.where(cards_2d[:, 0] == Poker.CARD_NOT_DEALT_TOKEN_1D,  # not dealt
                        Poker.CARD_NOT_DEALT_TOKEN_1D,
                        self.LUT_2DCARD_2_1DCARD[aa[:, 0], aa[:, 1]])
Args:
            cards_2d (iterable):   2D array of shape [N, 2]

        Returns:
            1D array of ints, representing the cards in 1D format
Args:
            cards_2d (iterable):   2D array of shape [N, 2]
Args : cards_2d ( iterable ) : 2D array of shape [ N 2 ]
def get_1d_cards(self, cards_2d):
        """
        Args:
            cards_2d (iterable):   2D array of shape [N, 2]

        Returns:
            1D array of ints, representing the cards in 1D format
        """
        if len(cards_2d.shape) == 0 or cards_2d.shape[0] == 0:
            return np.array([], dtype=np.int8)

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