I wish to obtain the numerical derivative of the levy-stable distributions. Here is my sample code -
import levy
from sympy import diff
import numpy as np
alpha = 1.25
x = np.linspace(-2,2,50)
f = lambda z: levy.levy(z, alpha, 0,0,1)
df = lambda x: diff(f, x, 1)
print(f(x))
print(df(x))
But I am not able to compute the derivative. I get the following error
SympifyError: Sympify of expression 'could not parse '<function <lambda> at 0x7f55a4d27158>'' failed, because of exception being raised:
SyntaxError: invalid syntax (<string>, line 1)
I wish to obtain the numerical derivative of the levy-stable distributions. Here is my sample code -
But I am not able to compute the derivative. I get the following error
Kindly help me with this. Thank you.