morestats.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.stats` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _morestats
  6. __all__ = [ # noqa: F822
  7. 'mvsdist',
  8. 'bayes_mvs', 'kstat', 'kstatvar', 'probplot', 'ppcc_max', 'ppcc_plot',
  9. 'boxcox_llf', 'boxcox', 'boxcox_normmax', 'boxcox_normplot',
  10. 'shapiro', 'anderson', 'ansari', 'bartlett', 'levene', 'binom_test',
  11. 'fligner', 'mood', 'wilcoxon', 'median_test',
  12. 'circmean', 'circvar', 'circstd', 'anderson_ksamp',
  13. 'yeojohnson_llf', 'yeojohnson', 'yeojohnson_normmax',
  14. 'yeojohnson_normplot', 'annotations', 'namedtuple', 'isscalar', 'log',
  15. 'around', 'unique', 'arange', 'sort', 'amin', 'amax', 'atleast_1d',
  16. 'array', 'compress', 'exp', 'ravel', 'count_nonzero', 'arctan2',
  17. 'hypot', 'optimize', 'find_repeats',
  18. 'chi2_contingency', 'distributions', 'rv_generic', 'Mean',
  19. 'Variance', 'Std_dev', 'ShapiroResult', 'AndersonResult',
  20. 'Anderson_ksampResult', 'AnsariResult', 'BartlettResult',
  21. 'LeveneResult', 'FlignerResult', 'WilcoxonResult'
  22. ]
  23. def __dir__():
  24. return __all__
  25. def __getattr__(name):
  26. if name not in __all__:
  27. raise AttributeError(
  28. "scipy.stats.morestats is deprecated and has no attribute "
  29. f"{name}. Try looking in scipy.stats instead.")
  30. warnings.warn(f"Please use `{name}` from the `scipy.stats` namespace, "
  31. "the `scipy.stats.morestats` namespace is deprecated.",
  32. category=DeprecationWarning, stacklevel=2)
  33. return getattr(_morestats, name)