def is_open(knot_vector, polynomial_degree):
    """
    Check whether a knot vector is open.

    Arguments
    ---------
    knot_vector : array_like
        The knot vector.
    polynomial_degree : int
        The polynomial degree of the curve generated by knot_vector.

    Returns
    -------
    bool
        True if the knot vector is open or False otherwise.
    """
    # Check whether the first and last (polynomial_degree + 1) knots are the same
    for i in range(1, polynomial_degree + 1):
        if knot_vector[0] != knot_vector[i] or knot_vector[-1] != knot_vector[-1 - i]:
            return False
    if knot_vector[polynomial_degree + 1] == knot_vector[0] or\
       knot_vector[-1 - (polynomial_degree + 1)] == knot_vector[-1]:
        return False
    return True