Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/special/orthogonal.py: 75%
12 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-12 06:31 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-12 06:31 +0000
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.
5import warnings
6from . import _orthogonal
9_polyfuns = ['legendre', 'chebyt', 'chebyu', 'chebyc', 'chebys',
10 'jacobi', 'laguerre', 'genlaguerre', 'hermite',
11 'hermitenorm', 'gegenbauer', 'sh_legendre', 'sh_chebyt',
12 'sh_chebyu', 'sh_jacobi']
14# Correspondence between new and old names of root functions
15_rootfuns_map = {'roots_legendre': 'p_roots',
16 'roots_chebyt': 't_roots',
17 'roots_chebyu': 'u_roots',
18 'roots_chebyc': 'c_roots',
19 'roots_chebys': 's_roots',
20 'roots_jacobi': 'j_roots',
21 'roots_laguerre': 'l_roots',
22 'roots_genlaguerre': 'la_roots',
23 'roots_hermite': 'h_roots',
24 'roots_hermitenorm': 'he_roots',
25 'roots_gegenbauer': 'cg_roots',
26 'roots_sh_legendre': 'ps_roots',
27 'roots_sh_chebyt': 'ts_roots',
28 'roots_sh_chebyu': 'us_roots',
29 'roots_sh_jacobi': 'js_roots'}
32__all__ = _polyfuns + list(_rootfuns_map.keys()) + [ # noqa: F822
33 'exp', 'inf', 'floor', 'around', 'hstack', 'arange',
34 'linalg', 'airy', 'orthopoly1d', 'newfun',
35 'oldfun', 'p_roots', 't_roots', 'u_roots', 'c_roots', 's_roots',
36 'j_roots', 'l_roots', 'la_roots', 'h_roots', 'he_roots', 'cg_roots',
37 'ps_roots', 'ts_roots', 'us_roots', 'js_roots'
38]
41def __dir__():
42 return __all__
45def __getattr__(name):
46 if name not in __all__:
47 raise AttributeError(
48 "scipy.special.orthogonal is deprecated and has no attribute "
49 f"{name}. Try looking in scipy.special instead.")
51 warnings.warn(f"Please use `{name}` from the `scipy.special` namespace, "
52 "the `scipy.special.orthogonal` namespace is deprecated.",
53 category=DeprecationWarning, stacklevel=2)
55 return getattr(_orthogonal, name)