Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter1 attribute not set for fit.powerlaw #98

Closed
henrymartin1 opened this issue Aug 16, 2022 · 1 comment · Fixed by #101
Closed

parameter1 attribute not set for fit.powerlaw #98

henrymartin1 opened this issue Aug 16, 2022 · 1 comment · Fixed by #101

Comments

@henrymartin1
Copy link
Contributor

Hey, I am using the library for a few days now and its really great and very helpful, thank you for this!
I encountered the following small error: The attribute parameter1 of the Fit class is not set for fit.power_law

As far as I understood the parameters of a fitted library can be accessed via its specific name (e.g., fit.power_law.alpha) or by the parameter1 attribute to facilitate accessing parameters of different distributions. Currently the attributes parameter1 and parameter1_name are not set for the power_law distribution.

fit = powerlaw.Fit(data)
assert fit.power_law.parameter1 == fit.power_law.alpha
assert fit.power_law.parameter1_name == 'alpha'
@jeffalstott
Copy link
Owner

@henrymartin1 Thanks for this and the other issues. If you or others submit a backwards-compatible pull request to address this I'll merge it in. If it's not backwards compatible it will take a moment's thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants