orthogonal.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.special` namespace for importing the functions
  3. # included below.
  4. from scipy._lib.deprecation import _sub_module_deprecation
  5. _polyfuns = ['legendre', 'chebyt', 'chebyu', 'chebyc', 'chebys',
  6. 'jacobi', 'laguerre', 'genlaguerre', 'hermite',
  7. 'hermitenorm', 'gegenbauer', 'sh_legendre', 'sh_chebyt',
  8. 'sh_chebyu', 'sh_jacobi']
  9. # Correspondence between new and old names of root functions
  10. _rootfuns_map = {'roots_legendre': 'p_roots',
  11. 'roots_chebyt': 't_roots',
  12. 'roots_chebyu': 'u_roots',
  13. 'roots_chebyc': 'c_roots',
  14. 'roots_chebys': 's_roots',
  15. 'roots_jacobi': 'j_roots',
  16. 'roots_laguerre': 'l_roots',
  17. 'roots_genlaguerre': 'la_roots',
  18. 'roots_hermite': 'h_roots',
  19. 'roots_hermitenorm': 'he_roots',
  20. 'roots_gegenbauer': 'cg_roots',
  21. 'roots_sh_legendre': 'ps_roots',
  22. 'roots_sh_chebyt': 'ts_roots',
  23. 'roots_sh_chebyu': 'us_roots',
  24. 'roots_sh_jacobi': 'js_roots'}
  25. __all__ = _polyfuns + list(_rootfuns_map.keys()) + [ # noqa: F822
  26. 'airy', 'p_roots', 't_roots', 'u_roots', 'c_roots', 's_roots',
  27. 'j_roots', 'l_roots', 'la_roots', 'h_roots', 'he_roots', 'cg_roots',
  28. 'ps_roots', 'ts_roots', 'us_roots', 'js_roots'
  29. ]
  30. def __dir__():
  31. return __all__
  32. def __getattr__(name):
  33. return _sub_module_deprecation(sub_package="special", module="orthogonal",
  34. private_modules=["_orthogonal"], all=__all__,
  35. attribute=name)