power_law(k, a=1.0, epsilon=0.0)¶
Return a power-law D function.
Given the scalars a, k and \(\varepsilon\), returns a function D defined as:\[D(\theta) = a\theta^k + \varepsilon\]
Function to evaluate \(D\) and its derivatives:
D(theta)evaluates and returns \(D\) at
D(theta, 1)returns both the value of \(D\) and its first derivative at
D(theta, 2)returns the value of \(D\), its first derivative, and its second derivative at
In all cases, the argument
thetamay be a single float or a NumPy array.
- Return type
Keep in mind that, depending on the parameters, the returned D does not necessarily map every value of \(\theta\) to a positive value.