def is_edge(connectivity):
    """
    Returns True if connectivity corresponds an edge (is two).
    
    :param connectivity: Scalar or matrix 
    :return: Boolean or matrix of boolean
    """
    return connectivity == 2
