jeffalstott / powerlaw

600 stars 132 forks source link

FIX: issue 98 #101

Closed henrymartin1 closed 2 years ago

henrymartin1 commented 2 years ago

Fixes #98 Simple fix for missing update of parameter values for power_law distribution. I simply checked in the fit method of the Power_Law class if the parameters are set and otherwise called self.parameters() to set them correctly. The reason for this was that the different cases in fit method are quite complex and I did not go into them in detail.

I added a test for this in the existing test class. This behavior exists for all test datasets except for 'words'.