def is_index(board, location):
    """
    Check whether a location is a valid index of the board
    
    Parameters:
    ----
    board : np.array
    location : np.array
    
    Returns
    ----
    is_index : bool
    """
    if len(location) != 2:
        return False
    x, y = location
    return x in range(board.shape[0]) and y in range(board.shape[1])
