unidip
unidip copied to clipboard
RuntimeWarning: divide by zero encountered in true_divide & invalid value encountered in multiply
Hi @BenjaminDoran ,
I find unidip
very helpful in identifying unimodal distributions. Thanks for the development of this package!
Regarding the warning I get, this happens when I run dip.diptst
/python3.6/site-packages/unidip/dip.py:27: RuntimeWarning: divide by zero encountered in true_divide
slopes = (work_cdf[1:] - work_cdf[0]) / distances
/python3.6/site-packages/unidip/dip.py:30: RuntimeWarning: invalid value encountered in multiply
gcm.extend(work_cdf[0] + distances[:minslope_idx] * minslope)
After the warning, the process stalls for a very long time. Looking at the values, I couldn't pinpoint the reason why this is happening. Any suggestions? I wonder how I could avoid this warning.