def derivative_from_polycoefficients(coeff, loc):
    """
    Return derivative of a polynomial of the form

        f(x) = coeff[0] + coeff[1]*x + coeff[2]*x**2 + ...

    at x = loc
    """
    derivative = 0.
    for n, c in enumerate(coeff):
        if n == 0:
            continue
        derivative += n*c*loc**(n-1)

    return derivative