|
7 | 7 | "source": [ |
8 | 8 | "# Scipy\n", |
9 | 9 | "\n", |
10 | | - "Copyright 2023 Marco A. Lopez-Sanchez. \n", |
| 10 | + "Copyright 2023-today Marco A. Lopez-Sanchez. \n", |
11 | 11 | "Content under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License](http://creativecommons.org/licenses/by-nc-sa/4.0/).\n", |
12 | 12 | "\n", |
13 | 13 | "> **Goal**: \n", |
|
65 | 65 | "import scipy as sp" |
66 | 66 | ] |
67 | 67 | }, |
| 68 | + { |
| 69 | + "cell_type": "code", |
| 70 | + "execution_count": 2, |
| 71 | + "metadata": {}, |
| 72 | + "outputs": [ |
| 73 | + { |
| 74 | + "name": "stdout", |
| 75 | + "output_type": "stream", |
| 76 | + "text": [ |
| 77 | + "\u001b[1;31mType:\u001b[0m module\n", |
| 78 | + "\u001b[1;31mString form:\u001b[0m <module 'scipy.integrate' from 'c:\\\\Users\\\\Marco\\\\miniconda3\\\\envs\\\\main\\\\Lib\\\\site-packages\\\\scipy\\\\integrate\\\\__init__.py'>\n", |
| 79 | + "\u001b[1;31mFile:\u001b[0m c:\\users\\marco\\miniconda3\\envs\\main\\lib\\site-packages\\scipy\\integrate\\__init__.py\n", |
| 80 | + "\u001b[1;31mDocstring:\u001b[0m \n", |
| 81 | + "=============================================\n", |
| 82 | + "Integration and ODEs (:mod:`scipy.integrate`)\n", |
| 83 | + "=============================================\n", |
| 84 | + "\n", |
| 85 | + ".. currentmodule:: scipy.integrate\n", |
| 86 | + "\n", |
| 87 | + "Integrating functions, given function object\n", |
| 88 | + "============================================\n", |
| 89 | + "\n", |
| 90 | + ".. autosummary::\n", |
| 91 | + " :toctree: generated/\n", |
| 92 | + "\n", |
| 93 | + " quad -- General purpose integration\n", |
| 94 | + " quad_vec -- General purpose integration of vector-valued functions\n", |
| 95 | + " dblquad -- General purpose double integration\n", |
| 96 | + " tplquad -- General purpose triple integration\n", |
| 97 | + " nquad -- General purpose N-D integration\n", |
| 98 | + " fixed_quad -- Integrate func(x) using Gaussian quadrature of order n\n", |
| 99 | + " quadrature -- Integrate with given tolerance using Gaussian quadrature\n", |
| 100 | + " romberg -- Integrate func using Romberg integration\n", |
| 101 | + " newton_cotes -- Weights and error coefficient for Newton-Cotes integration\n", |
| 102 | + " qmc_quad -- N-D integration using Quasi-Monte Carlo quadrature\n", |
| 103 | + " IntegrationWarning -- Warning on issues during integration\n", |
| 104 | + " AccuracyWarning -- Warning on issues during quadrature integration\n", |
| 105 | + "\n", |
| 106 | + "Integrating functions, given fixed samples\n", |
| 107 | + "==========================================\n", |
| 108 | + "\n", |
| 109 | + ".. autosummary::\n", |
| 110 | + " :toctree: generated/\n", |
| 111 | + "\n", |
| 112 | + " trapezoid -- Use trapezoidal rule to compute integral.\n", |
| 113 | + " cumulative_trapezoid -- Use trapezoidal rule to cumulatively compute integral.\n", |
| 114 | + " simpson -- Use Simpson's rule to compute integral from samples.\n", |
| 115 | + " cumulative_simpson -- Use Simpson's rule to cumulatively compute integral from samples.\n", |
| 116 | + " romb -- Use Romberg Integration to compute integral from\n", |
| 117 | + " -- (2**k + 1) evenly-spaced samples.\n", |
| 118 | + "\n", |
| 119 | + ".. seealso::\n", |
| 120 | + "\n", |
| 121 | + " :mod:`scipy.special` for orthogonal polynomials (special) for Gaussian\n", |
| 122 | + " quadrature roots and weights for other weighting factors and regions.\n", |
| 123 | + "\n", |
| 124 | + "Solving initial value problems for ODE systems\n", |
| 125 | + "==============================================\n", |
| 126 | + "\n", |
| 127 | + "The solvers are implemented as individual classes, which can be used directly\n", |
| 128 | + "(low-level usage) or through a convenience function.\n", |
| 129 | + "\n", |
| 130 | + ".. autosummary::\n", |
| 131 | + " :toctree: generated/\n", |
| 132 | + "\n", |
| 133 | + " solve_ivp -- Convenient function for ODE integration.\n", |
| 134 | + " RK23 -- Explicit Runge-Kutta solver of order 3(2).\n", |
| 135 | + " RK45 -- Explicit Runge-Kutta solver of order 5(4).\n", |
| 136 | + " DOP853 -- Explicit Runge-Kutta solver of order 8.\n", |
| 137 | + " Radau -- Implicit Runge-Kutta solver of order 5.\n", |
| 138 | + " BDF -- Implicit multi-step variable order (1 to 5) solver.\n", |
| 139 | + " LSODA -- LSODA solver from ODEPACK Fortran package.\n", |
| 140 | + " OdeSolver -- Base class for ODE solvers.\n", |
| 141 | + " DenseOutput -- Local interpolant for computing a dense output.\n", |
| 142 | + " OdeSolution -- Class which represents a continuous ODE solution.\n", |
| 143 | + "\n", |
| 144 | + "\n", |
| 145 | + "Old API\n", |
| 146 | + "-------\n", |
| 147 | + "\n", |
| 148 | + "These are the routines developed earlier for SciPy. They wrap older solvers\n", |
| 149 | + "implemented in Fortran (mostly ODEPACK). While the interface to them is not\n", |
| 150 | + "particularly convenient and certain features are missing compared to the new\n", |
| 151 | + "API, the solvers themselves are of good quality and work fast as compiled\n", |
| 152 | + "Fortran code. In some cases, it might be worth using this old API.\n", |
| 153 | + "\n", |
| 154 | + ".. autosummary::\n", |
| 155 | + " :toctree: generated/\n", |
| 156 | + "\n", |
| 157 | + " odeint -- General integration of ordinary differential equations.\n", |
| 158 | + " ode -- Integrate ODE using VODE and ZVODE routines.\n", |
| 159 | + " complex_ode -- Convert a complex-valued ODE to real-valued and integrate.\n", |
| 160 | + " ODEintWarning -- Warning raised during the execution of `odeint`.\n", |
| 161 | + "\n", |
| 162 | + "\n", |
| 163 | + "Solving boundary value problems for ODE systems\n", |
| 164 | + "===============================================\n", |
| 165 | + "\n", |
| 166 | + ".. autosummary::\n", |
| 167 | + " :toctree: generated/\n", |
| 168 | + "\n", |
| 169 | + " solve_bvp -- Solve a boundary value problem for a system of ODEs." |
| 170 | + ] |
| 171 | + } |
| 172 | + ], |
| 173 | + "source": [ |
| 174 | + "sp.integrate?" |
| 175 | + ] |
| 176 | + }, |
68 | 177 | { |
69 | 178 | "attachments": {}, |
70 | 179 | "cell_type": "markdown", |
|
77 | 186 | }, |
78 | 187 | { |
79 | 188 | "cell_type": "code", |
80 | | - "execution_count": 2, |
| 189 | + "execution_count": 3, |
81 | 190 | "metadata": {}, |
82 | 191 | "outputs": [ |
83 | 192 | { |
84 | 193 | "name": "stdout", |
85 | 194 | "output_type": "stream", |
86 | 195 | "text": [ |
87 | | - "Notebook tested in 2024-01-09 using:\n", |
88 | | - "Python 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:15:57) [MSC v.1916 64 bit (AMD64)]\n", |
89 | | - "Scipy 1.11.4\n" |
| 196 | + "Notebook tested in 2024-12-03 using:\n", |
| 197 | + "Python 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)]\n", |
| 198 | + "Scipy 1.14.1\n" |
90 | 199 | ] |
91 | 200 | } |
92 | 201 | ], |
|
117 | 226 | "name": "python", |
118 | 227 | "nbconvert_exporter": "python", |
119 | 228 | "pygments_lexer": "ipython3", |
120 | | - "version": "3.10.13" |
| 229 | + "version": "3.12.4" |
121 | 230 | }, |
122 | 231 | "orig_nbformat": 4, |
123 | 232 | "vscode": { |
|
0 commit comments