Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/optimize/optimize.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 _optimize
9__all__ = [ # noqa: F822
10 'Brent',
11 'FD_METHODS',
12 'Inf',
13 'LineSearchWarning',
14 'MapWrapper',
15 'MemoizeJac',
16 'OptimizeResult',
17 'OptimizeWarning',
18 'ScalarFunction',
19 'approx_derivative',
20 'approx_fhess_p',
21 'approx_fprime',
22 'argmin',
23 'asarray',
24 'asfarray',
25 'atleast_1d',
26 'bracket',
27 'brent',
28 'brute',
29 'check_grad',
30 'check_random_state',
31 'eye',
32 'fmin',
33 'fmin_bfgs',
34 'fmin_cg',
35 'fmin_ncg',
36 'fmin_powell',
37 'fminbound',
38 'golden',
39 'is_array_scalar',
40 'line_search',
41 'line_search_wolfe1',
42 'line_search_wolfe2',
43 'main',
44 'rosen',
45 'rosen_der',
46 'rosen_hess',
47 'rosen_hess_prod',
48 'shape',
49 'show_options',
50 'sqrt',
51 'squeeze',
52 'sys',
53 'vecnorm',
54 'zeros',
55]
58def __dir__():
59 return __all__
62def __getattr__(name):
63 if name not in __all__:
64 raise AttributeError(
65 "scipy.optimize.optimize is deprecated and has no attribute "
66 f"{name}. Try looking in scipy.optimize instead.")
68 warnings.warn(f"Please use `{name}` from the `scipy.optimize` namespace, "
69 "the `scipy.optimize.optimize` namespace is deprecated.",
70 category=DeprecationWarning, stacklevel=2)
72 return getattr(_optimize, name)