stats.py 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 _stats_py
  6. __all__ = [ # noqa: F822
  7. 'find_repeats', 'gmean', 'hmean', 'pmean', 'mode', 'tmean', 'tvar',
  8. 'tmin', 'tmax', 'tstd', 'tsem', 'moment',
  9. 'skew', 'kurtosis', 'describe', 'skewtest', 'kurtosistest',
  10. 'normaltest', 'jarque_bera', 'itemfreq',
  11. 'scoreatpercentile', 'percentileofscore',
  12. 'cumfreq', 'relfreq', 'obrientransform',
  13. 'sem', 'zmap', 'zscore', 'gzscore', 'iqr', 'gstd',
  14. 'median_absolute_deviation', 'median_abs_deviation',
  15. 'sigmaclip', 'trimboth', 'trim1', 'trim_mean',
  16. 'f_oneway', 'F_onewayConstantInputWarning',
  17. 'F_onewayBadInputSizesWarning',
  18. 'PearsonRConstantInputWarning', 'PearsonRNearConstantInputWarning',
  19. 'pearsonr', 'fisher_exact',
  20. 'SpearmanRConstantInputWarning', 'spearmanr', 'pointbiserialr',
  21. 'kendalltau', 'weightedtau', 'multiscale_graphcorr',
  22. 'linregress', 'siegelslopes', 'theilslopes', 'ttest_1samp',
  23. 'ttest_ind', 'ttest_ind_from_stats', 'ttest_rel',
  24. 'kstest', 'ks_1samp', 'ks_2samp',
  25. 'chisquare', 'power_divergence',
  26. 'tiecorrect', 'ranksums', 'kruskal', 'friedmanchisquare',
  27. 'rankdata',
  28. 'combine_pvalues', 'wasserstein_distance', 'energy_distance',
  29. 'brunnermunzel', 'alexandergovern', 'gcd', 'namedtuple', 'array',
  30. 'ma', 'cdist', 'check_random_state', 'MapWrapper',
  31. 'rng_integers', 'float_factorial', 'linalg', 'distributions',
  32. 'mstats_basic', 'make_dataclass', 'ModeResult', 'DescribeResult',
  33. 'SkewtestResult', 'KurtosistestResult', 'NormaltestResult',
  34. 'Jarque_beraResult', 'HistogramResult', 'CumfreqResult',
  35. 'RelfreqResult', 'SigmaclipResult', 'F_onewayResult',
  36. 'AlexanderGovernResult', 'AlexanderGovernConstantInputWarning',
  37. 'SpearmanrResult', 'PointbiserialrResult', 'KendalltauResult',
  38. 'WeightedTauResult', 'MGCResult', 'Ttest_1sampResult', 'Ttest_indResult',
  39. 'Ttest_relResult', 'Power_divergenceResult', 'KstestResult',
  40. 'Ks_2sampResult', 'RanksumsResult', 'KruskalResult',
  41. 'FriedmanchisquareResult', 'BrunnerMunzelResult', 'RepeatedResults'
  42. ]
  43. def __dir__():
  44. return __all__
  45. def __getattr__(name):
  46. if name not in __all__:
  47. raise AttributeError(
  48. "scipy.stats.stats is deprecated and has no attribute "
  49. f"{name}. Try looking in scipy.stats instead.")
  50. warnings.warn(f"Please use `{name}` from the `scipy.stats` namespace, "
  51. "the `scipy.stats.stats` namespace is deprecated.",
  52. category=DeprecationWarning, stacklevel=2)
  53. return getattr(_stats_py, name)