{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "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": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A rule implemented as the weighted sum of function evaluations at fixed nodes."
            }
          ]
        }
      ],
      "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": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "nodes_and_weights",
              "annotation": "(ndarray, ndarray)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A tuple "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(nodes, weights)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of nodes at which to evaluate "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "f"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and the corresponding weights. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "nodes"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " should be of shape "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(num_nodes,)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " for 1D cubature rules (quadratures) and more generally for N-D cubature rules, it should be of shape "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(num_nodes, ndim)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "weights"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " should be of shape "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(num_nodes,)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The nodes and weights should be for integrals over "
                    },
                    {
                      "__type": "InlineMath",
                      "__tag": 4057,
                      "value": "[-1, 1]^n"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "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/_rules/_base.py",
  "item_line": 154,
  "item_type": "class",
  "aliases": [
    "scipy.integrate._rules.FixedRule"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "Implementing Simpson's 1/3 rule:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nfrom scipy.integrate._rules import FixedRule\nclass SimpsonsQuad(FixedRule):\n    @property\n    def nodes_and_weights(self):\n        nodes = np.array([-1, 0, 1])\n        weights = np.array([1/3, 4/3, 1/3])\n        return (nodes, weights)\nrule = SimpsonsQuad()\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "rule.estimate(\n    f=lambda x: x**2,\n    a=np.array([0]),\n    b=np.array([1]),\n)\n",
        "execution_status": "failure"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "GaussKronrodQuadrature",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._rules._gauss_kronrod:GaussKronrodQuadrature"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "GaussLegendreQuadrature",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._rules._gauss_legendre:GaussLegendreQuadrature"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "GenzMalikCubature",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.integrate._rules._genz_malik:GenzMalikCubature"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "FixedRule"
  },
  "references": null,
  "qa": "scipy.integrate._rules._base:FixedRule",
  "arbitrary": [],
  "local_refs": [
    "nodes_and_weights"
  ]
}