Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2@file 

3@brief Some fixes for deprecated functions and not updated packages. 

4""" 

5 

6 

7def fix_scipy10_for_statsmodels08(): 

8 """ 

9 :epkg:`scipy` deprecated some functions 

10 still used by :epkg:`statsmodels` 0.8. 

11 See `deprecated features <https://scipy.github.io/devdocs/release.1.0.0.html#deprecated-features>`_ 

12 and pull request `3942 <https://github.com/statsmodels/statsmodels/pull/3942/files>`_ 

13 in :epkg:`statsmodels`. 

14 """ 

15 import scipy.stats 

16 if not hasattr(scipy.stats, "chisqprob"): 

17 import scipy.stats.distributions 

18 setattr(scipy.stats, "chisqprob", scipy.stats.distributions.chi2.sf) 

19 

20 

21if __name__ == "__main__": 

22 fix_scipy10_for_statsmodels08()