Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/integrate/__init__.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-12-12 06:31 +0000

1""" 

2============================================= 

3Integration and ODEs (:mod:`scipy.integrate`) 

4============================================= 

5 

6.. currentmodule:: scipy.integrate 

7 

8Integrating functions, given function object 

9============================================ 

10 

11.. autosummary:: 

12 :toctree: generated/ 

13 

14 quad -- General purpose integration 

15 quad_vec -- General purpose integration of vector-valued functions 

16 dblquad -- General purpose double integration 

17 tplquad -- General purpose triple integration 

18 nquad -- General purpose N-D integration 

19 fixed_quad -- Integrate func(x) using Gaussian quadrature of order n 

20 quadrature -- Integrate with given tolerance using Gaussian quadrature 

21 romberg -- Integrate func using Romberg integration 

22 newton_cotes -- Weights and error coefficient for Newton-Cotes integration 

23 IntegrationWarning -- Warning on issues during integration 

24 AccuracyWarning -- Warning on issues during quadrature integration 

25 

26Integrating functions, given fixed samples 

27========================================== 

28 

29.. autosummary:: 

30 :toctree: generated/ 

31 

32 trapezoid -- Use trapezoidal rule to compute integral. 

33 cumulative_trapezoid -- Use trapezoidal rule to cumulatively compute integral. 

34 simpson -- Use Simpson's rule to compute integral from samples. 

35 romb -- Use Romberg Integration to compute integral from 

36 -- (2**k + 1) evenly-spaced samples. 

37 

38.. seealso:: 

39 

40 :mod:`scipy.special` for orthogonal polynomials (special) for Gaussian 

41 quadrature roots and weights for other weighting factors and regions. 

42 

43Solving initial value problems for ODE systems 

44============================================== 

45 

46The solvers are implemented as individual classes, which can be used directly 

47(low-level usage) or through a convenience function. 

48 

49.. autosummary:: 

50 :toctree: generated/ 

51 

52 solve_ivp -- Convenient function for ODE integration. 

53 RK23 -- Explicit Runge-Kutta solver of order 3(2). 

54 RK45 -- Explicit Runge-Kutta solver of order 5(4). 

55 DOP853 -- Explicit Runge-Kutta solver of order 8. 

56 Radau -- Implicit Runge-Kutta solver of order 5. 

57 BDF -- Implicit multi-step variable order (1 to 5) solver. 

58 LSODA -- LSODA solver from ODEPACK Fortran package. 

59 OdeSolver -- Base class for ODE solvers. 

60 DenseOutput -- Local interpolant for computing a dense output. 

61 OdeSolution -- Class which represents a continuous ODE solution. 

62 

63 

64Old API 

65------- 

66 

67These are the routines developed earlier for SciPy. They wrap older solvers 

68implemented in Fortran (mostly ODEPACK). While the interface to them is not 

69particularly convenient and certain features are missing compared to the new 

70API, the solvers themselves are of good quality and work fast as compiled 

71Fortran code. In some cases, it might be worth using this old API. 

72 

73.. autosummary:: 

74 :toctree: generated/ 

75 

76 odeint -- General integration of ordinary differential equations. 

77 ode -- Integrate ODE using VODE and ZVODE routines. 

78 complex_ode -- Convert a complex-valued ODE to real-valued and integrate. 

79 

80 

81Solving boundary value problems for ODE systems 

82=============================================== 

83 

84.. autosummary:: 

85 :toctree: generated/ 

86 

87 solve_bvp -- Solve a boundary value problem for a system of ODEs. 

88""" # noqa: E501 

89 

90 

91from ._quadrature import * 

92from ._odepack_py import * 

93from ._quadpack_py import * 

94from ._ode import * 

95from ._bvp import solve_bvp 

96from ._ivp import (solve_ivp, OdeSolution, DenseOutput, 

97 OdeSolver, RK23, RK45, DOP853, Radau, BDF, LSODA) 

98from ._quad_vec import quad_vec 

99 

100# Deprecated namespaces, to be removed in v2.0.0 

101from . import dop, lsoda, vode, odepack, quadpack 

102 

103__all__ = [s for s in dir() if not s.startswith('_')] 

104 

105from scipy._lib._testutils import PytestTester 

106test = PytestTester(__name__) 

107del PytestTester