Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/optimize/slsqp.py: 70%
10 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.optimize` namespace for importing the functions
3# included below.
5import warnings
6from . import _slsqp_py
9__all__ = [ # noqa: F822
10 'OptimizeResult',
11 'append',
12 'approx_derivative',
13 'approx_jacobian',
14 'array',
15 'asfarray',
16 'atleast_1d',
17 'concatenate',
18 'exp',
19 'finfo',
20 'fmin_slsqp',
21 'inf',
22 'isfinite',
23 'linalg',
24 'old_bound_to_new',
25 'slsqp',
26 'sqrt',
27 'vstack',
28 'zeros',
29]
32def __dir__():
33 return __all__
36def __getattr__(name):
37 if name not in __all__:
38 raise AttributeError(
39 "scipy.optimize.slsqp is deprecated and has no attribute "
40 f"{name}. Try looking in scipy.optimize instead.")
42 warnings.warn(f"Please use `{name}` from the `scipy.optimize` namespace, "
43 "the `scipy.optimize.slsqp` namespace is deprecated.",
44 category=DeprecationWarning, stacklevel=2)
46 return getattr(_slsqp_py, name)