def kunc_dPdV(v, v0, k0, k0p, order=5, precision=1.e-5):
    """
    calculate dP/dV for numerical calculation of bulk modulus
    according to test this differs from analytical result by 1.e-5

    :param v: unit-cell volume in A^3
    :param v0: unit-cell volume in A^3 at 1 bar
    :param k0: bulk modulus at reference conditions
    :param k0p: pressure derivative of bulk modulus at reference conditions
    :param precision: precision for numerical calc (default = 1.e-5 * v0)
    :return: dP/dV
    """
    def f_scalar(v, v0, k0, k0p, order=order, precision=1.e-5):
        return derivative(kunc_p, v, args=(v0, k0, k0p, order),
                          dx=v0 * precision)
    f_v = np.vectorize(f_scalar, excluded=[1, 2, 3, 4, 5])
    return f_v(v, v0, k0, k0p, order=order, precision=precision)