{
  "__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": "No Docstrings"
            }
          ]
        }
      ],
      "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": [],
      "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": "build-install/usr/lib/python3.14/site-packages/numpy/polynomial/__init__.py",
  "item_line": 0,
  "item_type": "module",
  "aliases": [
    "numpy.polynomial"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "numpy.polynomial",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A sub-package for efficiently dealing with polynomials."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Within the documentation for this sub-package, a \"finite power series,\" i.e., a polynomial (also referred to simply as a \"series\") is represented by a 1-D numpy array of the polynomial's coefficients, ordered from lowest order term to highest.  For example, array([1,2,3]) represents "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "P_0 + 2*P_1 + 3*P_2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", where P_n is the n-th order basis polynomial applicable to the specific module in question, e.g., "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "polynomial",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "numpy.polynomial"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (which \"wraps\" the \"standard\" basis) or "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "chebyshev",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "numpy.polynomial.chebyshev"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ".  For optimal performance, all operations on polynomials, including evaluation at an argument, are implemented as operations on the coefficients.  Additional (module-specific) information can be found in the docstring for the module of interest."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This package provides "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "convenience classes"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for each of six different kinds of polynomials:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "========================    ================\n**Name**                    **Provides**\n========================    ================\n`~polynomial.Polynomial`    Power series\n`~chebyshev.Chebyshev`      Chebyshev series\n`~legendre.Legendre`        Legendre series\n`~laguerre.Laguerre`        Laguerre series\n`~hermite.Hermite`          Hermite series\n`~hermite_e.HermiteE`       HermiteE series\n========================    ================",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "These "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "convenience classes"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " provide a consistent interface for creating, manipulating, and fitting data with polynomials of different bases. The convenience classes are the preferred interface for the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "polynomial",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "numpy.polynomial"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " package, and are available from the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "numpy.polynomial"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " namespace. This eliminates the need to navigate to the corresponding submodules, e.g. "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.polynomial.Polynomial"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " or "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.polynomial.Chebyshev"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " instead of "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.polynomial.polynomial.Polynomial"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " or "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.polynomial.chebyshev.Chebyshev"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", respectively. The classes provide a more consistent and concise interface than the type-specific functions defined in the submodules for each type of polynomial. For example, to fit a Chebyshev polynomial with degree "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to data given by arrays "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "xdata"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ydata"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", the "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "~chebyshev.Chebyshev.fit",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " class method      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> from numpy.polynomial import Chebyshev\n>>> xdata = [1, 2, 3, 4]\n>>> ydata = [1, 4, 9, 16]\n>>> c = Chebyshev.fit(xdata, ydata, deg=1)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "is preferred over the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "chebyshev.chebfit",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "numpy.polynomial.chebyshev:chebfit"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " function from the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.polynomial.chebyshev"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " module      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> from numpy.polynomial.chebyshev import chebfit\n>>> c = chebfit(xdata, ydata, deg=1)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "See "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "routines.polynomials.classes",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "routines.polynomials.classes"
              },
              "kind": "docs"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for more details."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The following lists the various constants and methods common to all of the classes representing the various kinds of polynomials. In the following, the term "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "Poly"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " represents any one of the convenience classes (e.g. "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "~polynomial.Polynomial",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "~chebyshev.Chebyshev",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "Hermite",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "numpy.polynomial.hermite:Hermite"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", etc.) while the lowercase "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "p"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " represents an "
            },
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "instance"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " of a polynomial class."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Convenience Classes"
        }
      ],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.domain"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     -- Default domain"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.window"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     -- Default window"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.basis_name"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- String used to represent the basis"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.maxpower"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   -- Maximum value "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "n"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " such that "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p**n"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is allowed"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Constants"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Methods for creating polynomial instances."
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.basis(degree)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "    -- Basis polynomial of given degree"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.identity()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "       -- "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " where "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p(x) = x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " for all "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.fit(x, y, deg)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   -- "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of degree "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "deg"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " with coefficients   determined by the least-squares fit to the data "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "y"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.fromroots(roots)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " with specified roots"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.copy()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "              -- Create a copy of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Creation"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Methods for converting a polynomial instance of one kind to another."
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.cast(Poly)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "    -- Convert "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to instance of kind "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.convert(Poly)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Convert "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to instance of kind "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or map   between "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "domain"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "window"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Conversion"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.deriv()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Take the derivative of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.integ()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Integrate "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Calculus"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.has_samecoef(p1, p2)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   -- Check if coefficients match"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.has_samedomain(p1, p2)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Check if domains match"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.has_sametype(p1, p2)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   -- Check if types match"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Poly.has_samewindow(p1, p2)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Check if windows match"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Validation"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.linspace()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Return "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x, p(x)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " at equally-spaced points in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "domain"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.mapparms()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Return the parameters for the linear mapping between   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "domain"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "window"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.roots()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "    -- Return the roots of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.trim()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     -- Remove trailing coefficients."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.cutdeg(degree)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Truncate "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to given degree"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p.truncate(size)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " -- Truncate "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "p"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to given size"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Misc"
        }
      ],
      "level": 1,
      "target": null
    }
  ],
  "local_refs": []
}