I'm trying to use powerlaw module for a very simple case and it's not working properly. I read the documentation but didn't understand quite well. Using the code below, I'm getting 8.36310071704202
, instead of 0.5
, the exponent of my lambda
function
import powerlaw
func_powerlaw = lambda x, exp: (x**exp)
xdata = np.linspace(1.0, 10, num_points)
num_points=10
exp=0.5
y=func_powerlaw(xdata,exp)
plt.plot(xdata,y,'bo')
results = powerlaw.Fit(y)
print results.power_law.alpha()