def is_gap(array):
    """Identify gap positions in an integer encoded biological sequence.

    Parameters
    ----------
    array : ndarray, int
        Array of integers encoding alleles.

    Returns
    -------
    mask : ndarray, bool
        Array of booleans indicating gap positions.

    Notes
    -----
    Gaps are encoded as the value `-1`.

    """
    return array == -1