def make_alternating_boolean_array(shape, first_value=True):
    """
    Create a 2D numpy array with the given shape containing alternating values
    of False, True, False, True,... along each row and each column.

    Examples
    --------
    >>> make_alternating_boolean_array((4,4))
    array([[ True, False,  True, False],
           [False,  True, False,  True],
           [ True, False,  True, False],
           [False,  True, False,  True]], dtype=bool)
    >>> make_alternating_boolean_array((4,3), first_value=False)
    array([[False,  True, False],
           [ True, False,  True],
           [False,  True, False],
           [ True, False,  True]], dtype=bool)
    """
    if len(shape) != 2:
        raise ValueError(
            'Shape must be 2-dimensional. Given shape was {}'.format(shape)
        )
    alternating = np.empty(shape, dtype=np.bool)
    for row in alternating:
        row[::2] = first_value
        row[1::2] = not(first_value)
        first_value = not(first_value)
    return alternating