def is_end(connectivity):
    """
    Returns True if connectivity corresponds to an endpoint (is one).
    
    :param connectivity: Scalar or matrix 
    :return: Boolean or matrix of boolean 
    """
    return connectivity == 1