def get_pareto()

in src/plot_relaxed_pareto.py [0:0]


def get_pareto(x, y):
    points = np.zeros((len(x), 2))
    points[:, 0] = x
    points[:, 1] = y
    # Handle the exception and don't print the curve if not necessary
    if (len(x) > 2) and (len(np.unique(x)) > 1) and (len(np.unique(y)) > 1):
        try:
            hull = scipy.spatial.ConvexHull(points)
            pareto = determine_pareto_curve(points[hull.vertices])
            return pareto
        except scipy.spatial.qhull.QhullError:
            warnings.warn('\n WARNING: Scipy exception in qhull. This frequntly happens at high gamma values.'
                          ' Ignoring and continuing... \n ')