{
  "__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": "/scipy/sparse/linalg/_dsolve/__init__.py",
  "item_line": 0,
  "item_type": "module",
  "aliases": [
    "scipy.sparse.linalg._dsolve"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "scipy.sparse.linalg._dsolve",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The default solver is SuperLU (included in the scipy distribution), which can solve real or complex linear systems in both single and double precisions.  It is automatically replaced by UMFPACK, if available.  Note that UMFPACK works in double precision only, so switch it off by      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> from scipy.sparse.linalg import spsolve, use_solver\n>>> use_solver(useUmfpack=False)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "to solve in the single precision. See also use_solver documentation."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Example session      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> from scipy.sparse import csc_array, dia_array\n>>> from numpy import array\n>>>\n>>> print(\"Inverting a sparse linear system:\")\n>>> print(\"The sparse matrix (constructed from diagonals):\")\n>>> a = dia_array(([[1, 2, 3, 4, 5], [6, 5, 8, 9, 10]], [0, 1]), shape=(5, 5))\n>>> b = array([1, 2, 3, 4, 5])\n>>> print(\"Solve: single precision complex:\")\n>>> use_solver( useUmfpack = False )\n>>> a = a.astype('F')\n>>> x = spsolve(a, b)\n>>> print(x)\n>>> print(\"Error: \", a@x-b)\n>>>\n>>> print(\"Solve: double precision complex:\")\n>>> use_solver( useUmfpack = True )\n>>> a = a.astype('D')\n>>> x = spsolve(a, b)\n>>> print(x)\n>>> print(\"Error: \", a@x-b)\n>>>\n>>> print(\"Solve: double precision:\")\n>>> a = a.astype('d')\n>>> x = spsolve(a, b)\n>>> print(x)\n>>> print(\"Error: \", a@x-b)\n>>>\n>>> print(\"Solve: single precision:\")\n>>> use_solver( useUmfpack = False )\n>>> a = a.astype('f')\n>>> x = spsolve(a, b.astype('f'))\n>>> print(x)\n>>> print(\"Error: \", a@x-b)",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Linear Solvers"
        }
      ],
      "level": 0,
      "target": null
    }
  ],
  "local_refs": []
}