def _optimised_trapezodial_rule(y,x):
    """
    Basic Trapezodial rule integration

    Parameters
    ---------
    y : 'numpy.ndarray' (N)
        y values corresponding to `x`
    x : 'numpy.ndarray' (N)
        x values

    Returns
    -------
    float
        The trapezodial integral over the given values

    """
    s = 0
    # loop over values and perform trapezodial integral
    for j in range(1, len(x)):
        s += (x[j]-x[j-1])*(y[j]+y[j-1])
    return s/2