__init__.py 3.6 KB

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