{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For valid results, the integral must converge; behavior for divergent integrals is not guaranteed."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Details of QUADPACK level routines"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "nquad",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.integrate._quadpack_py:nquad"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " calls routines from the FORTRAN library QUADPACK. This section provides details on the conditions for each routine to be called and a short description of each routine. The routine called depends on "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "weight",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "points",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and the integration limits "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "a",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "b",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "================  ==============  ==========  =====================\nQUADPACK routine  `weight`        `points`    infinite bounds\n================  ==============  ==========  =====================\nqagse             None            No          No\nqagie             None            No          Yes\nqagpe             None            Yes         No\nqawoe             'sin', 'cos'    No          No\nqawfe             'sin', 'cos'    No          either `a` or `b`\nqawse             'alg*'          No          No\nqawce             'cauchy'        No          No\n================  ==============  ==========  =====================",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The following provides a short description from "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for each routine."
            }
          ]
        },
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qagse"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "is an integrator based on globally adaptive interval     subdivision in connection with extrapolation, which will     eliminate the effects of integrand singularities of     several types. The integration is is performed using a 21-point Gauss-Kronrod      quadrature within each subinterval."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qagie"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "handles integration over infinite intervals. The infinite range is     mapped onto a finite interval and subsequently the same strategy as     in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "QAGS"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is applied."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qagpe"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "serves the same purposes as QAGS, but also allows the     user to provide explicit information about the location     and type of trouble-spots i.e. the abscissae of internal     singularities, discontinuities and other difficulties of     the integrand function."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qawoe"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "is an integrator for the evaluation of     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\int^b_a \\cos(\\omega x)f(x)dx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\int^b_a \\sin(\\omega x)f(x)dx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     over a finite interval [a,b], where "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\omega"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "f"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     are specified by the user. The rule evaluation component is based     on the modified Clenshaw-Curtis technique"
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "An adaptive subdivision scheme is used in connection     with an extrapolation procedure, which is a modification     of that in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "QAGS"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and allows the algorithm to deal with     singularities in "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "f(x)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qawfe"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "calculates the Fourier transform     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\int^\\infty_a \\cos(\\omega x)f(x)dx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\int^\\infty_a \\sin(\\omega x)f(x)dx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     for user-provided "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\omega"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "f"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The procedure of     "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "QAWO"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is applied on successive finite intervals, and convergence     acceleration by means of the "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\varepsilon"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "-algorithm is applied     to the series of integral approximations."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qawse"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "approximate "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\int^b_a w(x)f(x)dx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", with "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "a < b"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " where     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "w(x) = (x-a)^{\\alpha}(b-x)^{\\beta}v(x)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " with     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\alpha,\\beta > -1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", where "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "v(x)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may be one of the     following functions: "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\log(x-a)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\log(b-x)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ",     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\log(x-a)\\log(b-x)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The user specifies "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\alpha"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\beta"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and the type of the     function "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "v"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". A globally adaptive subdivision strategy is     applied, with modified Clenshaw-Curtis integration on those     subintervals which contain "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "a",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "b",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "qawce"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "compute "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "\\int^b_a f(x) / (x-c)dx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " where the integral must be     interpreted as a Cauchy principal value integral, for user specified     "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "c"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "f"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The strategy is globally adaptive. Modified     Clenshaw-Curtis integration is used on those intervals containing the     point "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "x = c"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Array API Standard Support"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "nquad",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.integrate._quadpack_py:nquad"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "SCIPY_ARRAY_API=1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "====================  ====================  ====================\nLibrary               CPU                   GPU\n====================  ====================  ====================\nNumPy                 ✅                     n/a                 \nCuPy                  n/a                   ⛔                   \nPyTorch               ⛔                     ⛔                   \nJAX                   ⛔                     ⛔                   \nDask                  ⛔                     n/a                 \n====================  ====================  ====================",
          "execution_status": null
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "See "
                },
                {
                  "__type": "InlineRole",
                  "__tag": 4003,
                  "value": "dev-arrayapi",
                  "domain": null,
                  "role": "ref",
                  "inventory": null
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " for more information."
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "result",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The result of the integration."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "abserr",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The maximum of the estimates of the absolute error in the various integration results."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "out_dict",
              "annotation": "dict, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A dict containing additional information on the integration."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Integration over multiple variables."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "func",
              "annotation": "{callable, scipy.LowLevelCallable}",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The function to be integrated. Has arguments of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x0, ..., xn"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "t0, ..., tm"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", where integration is carried out over "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x0, ..., xn"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", which must be floats.  Where "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "t0, ..., tm"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " are extra arguments passed in args. Function signature should be "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "func(x0, x1, ..., xn, t0, t1, ..., tm)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Integration is carried out in order.  That is, integration over "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the innermost integral, and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "xn"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the outermost."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If the user desires improved integration performance, then "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "f",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may be a "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "scipy.LowLevelCallable",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "scipy",
                        "version": "*",
                        "kind": "api",
                        "path": "scipy._lib._ccallback:LowLevelCallable"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " with one of the signatures      "
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "double func(int n, double *xx)\ndouble func(int n, double *xx, void *user_data)",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "where "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "n"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the number of variables and args.  The "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "xx"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " array contains the coordinates and extra arguments. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "user_data"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the data contained in the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "scipy.LowLevelCallable",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "scipy",
                        "version": "*",
                        "kind": "api",
                        "path": "scipy._lib._ccallback:LowLevelCallable"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "ranges",
              "annotation": "iterable object",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Each element of ranges may be either a sequence  of 2 numbers, or else a callable that returns such a sequence. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ranges[0]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " corresponds to integration over x0, and so on. If an element of ranges is a callable, then it will be called with all of the integration arguments available, as well as any parametric arguments. e.g., if "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "func = f(x0, x1, x2, t0, t1)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", then "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ranges[0]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may be defined as either "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(a, b)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or else as "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(a, b) = range0(x1, x2, t0, t1)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "args",
              "annotation": "iterable object, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Additional arguments "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "t0, ..., tn"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", required by "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ranges"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "opts"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "opts",
              "annotation": "iterable object or dict, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Options to be passed to "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "quad",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.integrate._quadpack_py:quad"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". May be empty, a dict, or a sequence of dicts or functions that return a dict. If empty, the default options from scipy.integrate.quad are used. If a dict, the same options are used for all levels of integraion. If a sequence, then each element of the sequence corresponds to a particular integration. e.g., "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "opts[0]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " corresponds to integration over "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", and so on. If a callable, the signature must be the same as for "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ranges"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The available options together with their default values are:"
                    }
                  ]
                },
                {
                  "__type": "Blockquote",
                  "__tag": 4059,
                  "children": [
                    {
                      "__type": "BulletList",
                      "__tag": 4053,
                      "ordered": false,
                      "start": 1,
                      "children": [
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "epsabs = 1.49e-08"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "epsrel = 1.49e-08"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "limit  = 50"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "points = None"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "weight = None"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "wvar   = None"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "wopts  = None"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "For more information on these options, see "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "quad",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.integrate._quadpack_py:quad"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "full_output",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Partial implementation of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "full_output"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " from scipy.integrate.quad. The number of integrand function evaluations "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "neval"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " can be obtained by setting "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "full_output=True"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " when calling nquad."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Wraps "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "quad",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.integrate._quadpack_py:quad"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to enable integration over multiple variables. Various options allow improved integration of discontinuous functions, as well as the use of weighted integration, and generally finer control of the integration process."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/scipy/integrate/_quadpack_py.py",
  "item_line": 981,
  "item_type": "function",
  "aliases": [
    "scipy.integrate.nquad"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "Calculate\n\n.. math::\n\n    \\int^{1}_{-0.15} \\int^{0.8}_{0.13} \\int^{1}_{-1} \\int^{1}_{0}\n    f(x_0, x_1, x_2, x_3) \\,dx_0 \\,dx_1 \\,dx_2 \\,dx_3 ,\n\nwhere\n\n.. math::\n\n    f(x_0, x_1, x_2, x_3) = \\begin{cases}\n      x_0^2+x_1 x_2-x_3^3+ \\sin{x_0}+1 & (x_0-0.2 x_3-0.5-0.25 x_1 > 0) \\\\\n      x_0^2+x_1 x_2-x_3^3+ \\sin{x_0}+0 & (x_0-0.2 x_3-0.5-0.25 x_1 \\leq 0)\n    \\end{cases} .\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nfrom scipy import integrate\nfunc = lambda x0,x1,x2,x3 : x0**2 + x1*x2 - x3**3 + np.sin(x0) + (\n                                1 if (x0-.2*x3-.5-.25*x1>0) else 0)\ndef opts0(*args, **kwargs):\n    return {'points':[0.2*args[2] + 0.5 + 0.25*args[0]]}\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "integrate.nquad(func, [[0,1], [-1,1], [.13,.8], [-.15,1]],\n                opts=[opts0,{},{},{}], full_output=True)\n",
        "execution_status": "failure"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCalculate\n\n.. math::\n\n    \\int^{t_0+t_1+1}_{t_0+t_1-1}\n    \\int^{x_2+t_0^2 t_1^3+1}_{x_2+t_0^2 t_1^3-1}\n    \\int^{t_0 x_1+t_1 x_2+1}_{t_0 x_1+t_1 x_2-1}\n    f(x_0,x_1, x_2,t_0,t_1)\n    \\,dx_0 \\,dx_1 \\,dx_2,\n\nwhere\n\n.. math::\n\n    f(x_0, x_1, x_2, t_0, t_1) = \\begin{cases}\n      x_0 x_2^2 + \\sin{x_1}+2 & (x_0+t_1 x_1-t_0 > 0) \\\\\n      x_0 x_2^2 +\\sin{x_1}+1 & (x_0+t_1 x_1-t_0 \\leq 0)\n    \\end{cases}\n\nand :math:`(t_0, t_1) = (0, 1)` .\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "def func2(x0, x1, x2, t0, t1):\n    return x0*x2**2 + np.sin(x1) + 1 + (1 if x0+t1*x1-t0>0 else 0)\ndef lim0(x1, x2, t0, t1):\n    return [t0*x1 + t1*x2 - 1, t0*x1 + t1*x2 + 1]\ndef lim1(x2, t0, t1):\n    return [x2 + t0**2*t1**3 - 1, x2 + t0**2*t1**3 + 1]\ndef lim2(t0, t1):\n    return [t0 + t1 - 1, t0 + t1 + 1]\ndef opts0(x1, x2, t0, t1):\n    return {'points' : [t0 - t1*x1]}\ndef opts1(x2, t0, t1):\n    return {}\ndef opts2(t0, t1):\n    return {}\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "integrate.nquad(func2, [lim0, lim1, lim2], args=(0,1),\n                opts=[opts0, opts1, opts2])\n",
        "execution_status": "failure"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "dblquad",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._quadpack_py:dblquad"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "double and triple integrals"
            }
          ]
        }
      ],
      "type": "func"
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "fixed_quad",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._quadrature:fixed_quad"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "fixed-order Gaussian quadrature"
            }
          ]
        }
      ],
      "type": "func"
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "quad",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._quadpack_py:quad"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "1-D numerical integration"
            }
          ]
        }
      ],
      "type": "func"
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "tplquad",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._quadpack_py:tplquad"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "double and triple integrals"
            }
          ]
        }
      ],
      "type": "func"
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "func",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "ranges",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "args",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "opts",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "full_output",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "False"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "nquad"
  },
  "references": [
    ".. [1] Piessens, Robert; de Doncker-Kapenga, Elise;",
    "       Überhuber, Christoph W.; Kahaner, David (1983).",
    "       QUADPACK: A subroutine package for automatic integration.",
    "       Springer-Verlag.",
    "       ISBN 978-3-540-12553-2."
  ],
  "qa": "scipy.integrate._quadpack_py:nquad",
  "arbitrary": [],
  "local_refs": [
    "abserr",
    "args",
    "full_output",
    "func",
    "opts",
    "out_dict",
    "ranges",
    "result"
  ]
}