def curvature(cs, x):
    """
    Return the curvature (inverse radius of curvature) of the lane.

    Parameters:

    cs: CubicSpline
        Instance of the CubicSpline calss

    x: float or array of floats
        Points at which to evaluate the curvature

    >>> from eksternlab import curvature
    >>> x = [0.23, 0.26, 0.39]
    >>> kappa = curvature(h, x)
    """
    second_deriv = cs(x, 2)
    deriv = cs(x, 1)
    return second_deriv/(1.0 + deriv**2)**1.5