kikocorreoso / scikit-extremes

scikit-extremes is a basic statistical package to perform univariate extreme value calculations using Python
MIT License
41 stars 10 forks source link

AttributeError: module 'scipy.misc' has no attribute 'comb' #8

Closed ricbencar closed 5 years ago

ricbencar commented 5 years ago

model = ske.models.classic.GEV(anualmax,fit_method='mle', ci=0.2, ci_method="delta")

produces this error:

AttributeError: module 'scipy.misc' has no attribute 'comb'

The errror ocurs since latest scipy upgrade.

kikocorreoso commented 5 years ago

Could you paste the complete traceback error? I think it is an error on lmoments3.

Please, follow these instructions to install skextremes: https://github.com/kikocorreoso/scikit-extremes#installation

You have to install the master branch from lmoments3 in order to use a modern scipy version.

ricbencar commented 5 years ago

Reinstalled lmoments3 and the error is gone. Thanks.

kikocorreoso commented 5 years ago

Great!!

Jarvine commented 4 years ago

I just experienced the same problem after installing lmoments3 in python3 env. Traceback:

`>>> import lmoments3 as lm

from lmoments3 import distr data = [51.1, 73.1, 88.1, 101.4, 57.1, 76.1, 92.6, 103.4, 65.1, 81.9, 94.9, 103.8, 69.2, 84.1, 96.6, 105.2, 71.2, 86.6, 97.0, 119.1] paras = distr.gev.lmom_fit(data) Traceback (most recent call last): File "", line 1, in File "/home/allan/myenvs/py36/lib/python3.6/site-packages/lmoments3/distr.py", line 59, in lmom_fit lmom_ratios = lm.lmom_ratios(data, nmom=n_min) File "/home/allan/myenvs/py36/lib/python3.6/site-packages/lmoments3/init.py", line 82, in lmom_ratios return _samlmusmall(data, nmom) File "/home/allan/myenvs/py36/lib/python3.6/site-packages/lmoments3/init.py", line 159, in _samlmusmall l1 = np.sum(x) / sm.comb(n, 1, exact=True) AttributeError: module 'scipy.misc' has no attribute 'comb' ` Edit:

Ok, I uninstalled lmoments3 and re-installed it:

pip install git+https://github.com/OpenHydrology/lmoments3.git

And re-run the simple code and it worked - thank you!