powerlaw icon indicating copy to clipboard operation
powerlaw copied to clipboard

divide by 0 warnings

Open charlesmartin14 opened this issue 5 years ago • 1 comments

let me suggest using

(Theoretical_CDF * (1 - Theoretical_CDF)+0.0000001) on line 700 of

charlesmartin14 avatar Jul 20 '19 05:07 charlesmartin14

Another good option would be to use the machine precision epsilon for floating number:

(Theoretical_CDF * (1 - Theoretical_CDF)+np.finfo(float).eps) # machine precision epsilon

A previous definition eps = np.finfo(float).eps # machine precision epsilon could also make the code more readable

r-menezes avatar Oct 27 '20 15:10 r-menezes