{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {},
  "_ordered_sections": [],
  "item_file": null,
  "item_line": null,
  "item_type": null,
  "aliases": [],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "tutorial:interpolate",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "There are several general facilities available in SciPy for interpolation and smoothing for data in 1, 2, and higher dimensions. The choice of a specific interpolation routine depends on the data: whether it is one-dimensional, is given on a structured grid, or is unstructured. One other factor is the desired smoothness of the interpolator. In short, routines recommended "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "for\ninterpolation"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " can be summarized as follows:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "+------------------+-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | **kind**                | **routine**                  | **continuity**         | **comment**                           |\n+==================+=========================+==============================+========================+=======================================+\n|                  | linear                  | `numpy.interp`               | piecewise continuous   | Alternatively,                        |\n|                  |                         |                              |                        | ``make_interp_spline(..., k=1)``      |\n+                  +-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | cubic spline            | `CubicSpline`                | 2nd derivative         |                                       |\n+                  +-------------------------+------------------------------+------------------------+---------------------------------------+\n|       1D         | monotone cubic spline   | `PchipInterpolator`          | 1st derivative         | non-overshooting                      |\n+                  +-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | non-cubic spline        | `make_interp_spline`         | (k-1)th derivative     | ``k=3`` is equivalent to `CubicSpline`|\n+                  +-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | nearest                 | `interp1d`                   |                        | kind='nearest', 'previous', 'next'    |\n+------------------+-------------------------+------------------------------+------------------------+---------------------------------------+\n| N-D curve        | nearest, linear, spline | `make_interp_spline`         | (k-1)th derivative     | use N-dim `y` array                   |\n+------------------+-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | nearest                 |                              |                        |  method='nearest'                     |\n+                  +-------------------------+                              +                        +---------------------------------------+\n| N-D regular      | linear                  | `RegularGridInterpolator`    |                        |  method='linear'                      |\n+ (*rectilinear*)  +-------------------------+                              +------------------------+---------------------------------------+\n| grid             | splines                 |                              | 2nd derivatives        |  method='cubic', 'quintic'            |\n+                  +-------------------------+                              +------------------------+---------------------------------------+\n|                  | monotone splines        |                              | 1st derivatives        |  method='pchip'                       |\n+------------------+-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | nearest                 | `NearestNDInterpolator`      |                        |                                       |\n+                  +-------------------------+------------------------------+                        +                                       +\n|  N-D scattered   | linear                  | `LinearNDInterpolator`       |                        | alias: `griddata`                     |\n+                  +-------------------------+------------------------------+------------------------+                                       +\n|                  | cubic (2D only)         | `CloughTocher2DInterpolator` | 1st derivatives        |                                       |\n+                  +-------------------------+------------------------------+------------------------+---------------------------------------+\n|                  | radial basis function   | `RBFInterpolator`            |                        |                                       |\n+------------------+-------------------------+------------------------------+------------------------+---------------------------------------+",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Interpolation ("
        },
        {
          "__type": "InlineRole",
          "__tag": 4003,
          "value": "scipy.interpolate",
          "domain": null,
          "role": "mod",
          "inventory": null
        },
        {
          "__type": "Text",
          "__tag": 4046,
          "value": ")"
        }
      ],
      "level": 0,
      "target": "tutorial-interpolate"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "+-------------------------------+-------------------------+-------------------------------+\n|                               | `make_smoothing_spline` |  classic smoothing splines,   |\n|                               |                         |  GCV penalty                  |\n| 1D spline functions           +-------------------------+-------------------------------+\n|                               | `make_splrep`           | automated/semi-automated knot |\n|                               |                         | selection                     |\n+-------------------------------+-------------------------+-------------------------------+\n| spine curves in N-D           | `make_splprep`          |                               |\n+-------------------------------+-------------------------+-------------------------------+\n| unconstrained least squares   | `make_lsq_spline`       |                               |\n| spline fit                    |                         |                               |\n+-------------------------------+-------------------------+-------------------------------+\n| 2D smoothing surfaces         | `bisplrep`              | scattered data                |\n+-------------------------------+-------------------------+-------------------------------+\n|                               | `RectBivariateSpline`   | gridded data                  |\n+-------------------------------+-------------------------+-------------------------------+\n| Radial basis functions in N-D | `RBFInterpolator`       |                               |\n+-------------------------------+-------------------------+-------------------------------+",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Further details are given in the links below"
                }
              ]
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "1-D interpolation",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:1D"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "Piecewise polynomials and splines",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:splines_and_polynomials"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "Smoothing splines",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:smoothing_splines"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "Multivariate data interpolation on a regular grid  (RegularGridInterpolator)",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:ND_regular_grid"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "Scattered data interpolation (griddata)",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:ND_unstructured"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "Extrapolation tips and tricks",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:extrapolation_examples"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "interpolate/interp_transition_guide.md",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "tutorial:interpolate:interp_transition_guide.md"
                      },
                      "kind": "exists"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Smoothing and approximation of data"
        }
      ],
      "level": 1,
      "target": null
    }
  ],
  "local_refs": []
}