__init__.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. """
  2. =============================================
  3. Integration and ODEs (:mod:`scipy.integrate`)
  4. =============================================
  5. .. currentmodule:: scipy.integrate
  6. Integrating functions, given function object
  7. ============================================
  8. .. autosummary::
  9. :toctree: generated/
  10. quad -- General purpose integration
  11. quad_vec -- General purpose integration of vector-valued functions
  12. dblquad -- General purpose double integration
  13. tplquad -- General purpose triple integration
  14. nquad -- General purpose N-D integration
  15. fixed_quad -- Integrate func(x) using Gaussian quadrature of order n
  16. quadrature -- Integrate with given tolerance using Gaussian quadrature
  17. romberg -- Integrate func using Romberg integration
  18. newton_cotes -- Weights and error coefficient for Newton-Cotes integration
  19. IntegrationWarning -- Warning on issues during integration
  20. AccuracyWarning -- Warning on issues during quadrature integration
  21. Integrating functions, given fixed samples
  22. ==========================================
  23. .. autosummary::
  24. :toctree: generated/
  25. trapezoid -- Use trapezoidal rule to compute integral.
  26. cumulative_trapezoid -- Use trapezoidal rule to cumulatively compute integral.
  27. simpson -- Use Simpson's rule to compute integral from samples.
  28. romb -- Use Romberg Integration to compute integral from
  29. -- (2**k + 1) evenly-spaced samples.
  30. .. seealso::
  31. :mod:`scipy.special` for orthogonal polynomials (special) for Gaussian
  32. quadrature roots and weights for other weighting factors and regions.
  33. Solving initial value problems for ODE systems
  34. ==============================================
  35. The solvers are implemented as individual classes, which can be used directly
  36. (low-level usage) or through a convenience function.
  37. .. autosummary::
  38. :toctree: generated/
  39. solve_ivp -- Convenient function for ODE integration.
  40. RK23 -- Explicit Runge-Kutta solver of order 3(2).
  41. RK45 -- Explicit Runge-Kutta solver of order 5(4).
  42. DOP853 -- Explicit Runge-Kutta solver of order 8.
  43. Radau -- Implicit Runge-Kutta solver of order 5.
  44. BDF -- Implicit multi-step variable order (1 to 5) solver.
  45. LSODA -- LSODA solver from ODEPACK Fortran package.
  46. OdeSolver -- Base class for ODE solvers.
  47. DenseOutput -- Local interpolant for computing a dense output.
  48. OdeSolution -- Class which represents a continuous ODE solution.
  49. Old API
  50. -------
  51. These are the routines developed earlier for SciPy. They wrap older solvers
  52. implemented in Fortran (mostly ODEPACK). While the interface to them is not
  53. particularly convenient and certain features are missing compared to the new
  54. API, the solvers themselves are of good quality and work fast as compiled
  55. Fortran code. In some cases, it might be worth using this old API.
  56. .. autosummary::
  57. :toctree: generated/
  58. odeint -- General integration of ordinary differential equations.
  59. ode -- Integrate ODE using VODE and ZVODE routines.
  60. complex_ode -- Convert a complex-valued ODE to real-valued and integrate.
  61. Solving boundary value problems for ODE systems
  62. ===============================================
  63. .. autosummary::
  64. :toctree: generated/
  65. solve_bvp -- Solve a boundary value problem for a system of ODEs.
  66. """ # noqa: E501
  67. from ._quadrature import *
  68. from ._odepack_py import *
  69. from ._quadpack_py import *
  70. from ._ode import *
  71. from ._bvp import solve_bvp
  72. from ._ivp import (solve_ivp, OdeSolution, DenseOutput,
  73. OdeSolver, RK23, RK45, DOP853, Radau, BDF, LSODA)
  74. from ._quad_vec import quad_vec
  75. # Deprecated namespaces, to be removed in v2.0.0
  76. from . import dop, lsoda, vode, odepack, quadpack
  77. __all__ = [s for s in dir() if not s.startswith('_')]
  78. from scipy._lib._testutils import PytestTester
  79. test = PytestTester(__name__)
  80. del PytestTester