{
  "__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": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "",
              "annotation": "ValueError",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If provided a non-integer or out of range "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "[-N-1, N]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " axis, where "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "N"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A.ndim"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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": "out",
              "annotation": "sparse array",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A expanded copy output in COO format with the same dtype as "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "A"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Add trivial axes to an array. Shape gets a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " inserted at position "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "axis"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "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": "sparse array",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "axis",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Position in the expanded axes where the new axis (or axes) is placed. For a dimension "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "N"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " array, a valid axis is an integer on the closed-interval "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "[-N-1, N]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Negative values work from the end of the shape. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " prepends an axis, as does "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "-N-1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "-1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " appends an axis, as does "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "N"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The new axis has shape "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and indices are created with the value "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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/_construct.py",
  "item_line": 32,
  "item_type": "function",
  "aliases": [
    "scipy.sparse.expand_dims"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "from scipy.sparse import csr_array, expand_dims\nA = csr_array([[1, 2], [2, 0]])\nA.shape\nexpand_dims(A, axis=1).shape\n",
        "execution_status": "success"
      }
    ],
    "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_ONLY",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "axis",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "0"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "expand_dims"
  },
  "references": null,
  "qa": "scipy.sparse._construct:expand_dims",
  "arbitrary": [],
  "local_refs": [
    "A",
    "axis",
    "out"
  ]
}