{
  "__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": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "lower, upper",
              "annotation": "2-tuple of bool",
              "desc": [
                {
                  "__type": "Admonition",
                  "__tag": 4056,
                  "kind": "versionadded",
                  "base_type": "neutral",
                  "children": [
                    {
                      "__type": "AdmonitionTitle",
                      "__tag": 4055,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "versionadded 1.15.0"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Returns 2-tuple indicating lower/upper triangular structure for sparse "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A"
            }
          ]
        }
      ],
      "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": "A",
              "annotation": "SciPy sparse array or matrix",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A sparse matrix preferrably in CSR or CSC format."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Checks for triangular structure in "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". The result is summarized in two boolean values "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "lower"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "upper"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to designate whether "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is lower triangular or upper triangular respectively. Diagonal "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " will result in both being True. Non-triangular structure results in False for both."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Only the sparse structure is used here. Values are not checked for zeros."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This function will convert a copy of "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to CSC format if it is not already CSR or CSC format. So it may be more efficient to convert it yourself if you have other uses for the CSR/CSC version."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is not square, the portions outside the upper left square of the matrix do not affect its triangular structure. You probably want to work with the square portion of the matrix, though it is not requred here."
            }
          ]
        }
      ],
      "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/linsolve.py",
  "item_line": 750,
  "item_type": "function",
  "aliases": [
    "scipy.sparse.linalg.is_sptriangular"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nfrom scipy.sparse import csc_array, eye_array\nfrom scipy.sparse.linalg import is_sptriangular\nA = csc_array([[3, 0, 0], [1, -1, 0], [2, 0, 1]], dtype=float)\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "is_sptriangular(A)\n",
        "execution_status": "failure"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "D = eye_array(3, format='csr')\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "is_sptriangular(D)\n",
        "execution_status": "failure"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "A",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "is_sptriangular"
  },
  "references": null,
  "qa": "scipy.sparse.linalg._dsolve.linsolve:is_sptriangular",
  "arbitrary": [],
  "local_refs": [
    "A",
    "lower",
    "upper"
  ]
}