Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/optimize/minpack.py: 70%

10 statements  

« 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. 

4 

5import warnings 

6from . import _minpack_py 

7 

8 

9__all__ = [ # noqa: F822 

10 'LEASTSQ_FAILURE', 

11 'LEASTSQ_SUCCESS', 

12 'LinAlgError', 

13 'OptimizeResult', 

14 'OptimizeWarning', 

15 'asarray', 

16 'atleast_1d', 

17 'check_gradient', 

18 'cholesky', 

19 'curve_fit', 

20 'dot', 

21 'dtype', 

22 'error', 

23 'eye', 

24 'finfo', 

25 'fixed_point', 

26 'fsolve', 

27 'greater', 

28 'inexact', 

29 'inf', 

30 'inv', 

31 'issubdtype', 

32 'least_squares', 

33 'leastsq', 

34 'prepare_bounds', 

35 'prod', 

36 'shape', 

37 'solve_triangular', 

38 'svd', 

39 'take', 

40 'transpose', 

41 'triu', 

42 'zeros', 

43] 

44 

45 

46def __dir__(): 

47 return __all__ 

48 

49 

50def __getattr__(name): 

51 if name not in __all__: 

52 raise AttributeError( 

53 "scipy.optimize.minpack is deprecated and has no attribute " 

54 f"{name}. Try looking in scipy.optimize instead.") 

55 

56 warnings.warn(f"Please use `{name}` from the `scipy.optimize` namespace, " 

57 "the `scipy.optimize.minpack` namespace is deprecated.", 

58 category=DeprecationWarning, stacklevel=2) 

59 

60 return getattr(_minpack_py, name)