{
  "__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": "rotvec",
              "annotation": "ndarray, shape (..., 3)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Shape depends on shape of inputs used for initialization."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Represent as rotation vectors."
            }
          ]
        }
      ],
      "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": "degrees",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Returned magnitudes are in degrees if this flag is True, else they are in radians. Default is False."
                    }
                  ]
                },
                {
                  "__type": "Admonition",
                  "__tag": 4056,
                  "kind": "versionadded",
                  "base_type": "neutral",
                  "children": [
                    {
                      "__type": "AdmonitionTitle",
                      "__tag": 4055,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "versionadded 1.7.0"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A rotation vector is a 3 dimensional vector which is co-directional to the axis of rotation and whose norm gives the angle of rotation "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "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/scipy/spatial/transform/_rotation.py",
  "item_line": 1157,
  "item_type": "function",
  "aliases": [
    "scipy.spatial.transform.Rotation.as_rotvec"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "from scipy.spatial.transform import Rotation as R\nimport numpy as np\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRepresent a single rotation:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r = R.from_euler('z', 90, degrees=True)\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_rotvec()\n",
        "execution_status": "failure",
        "out": "array([0.    , 0.    , 1.5708])\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_rotvec().shape\n",
        "execution_status": "success",
        "out": "(3,)\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRepresent a rotation in degrees:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r = R.from_euler('YX', (-90, -90), degrees=True)\ns = r.as_rotvec(degrees=True)\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "s\nnp.linalg.norm(s)\n",
        "execution_status": "failure",
        "out": "np.float64(119.99999999999997)\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRepresent a stack with a single rotation:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r = R.from_quat([[0, 0, 1, 1]])\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_rotvec()\n",
        "execution_status": "failure",
        "out": "array([[0.    , 0.    , 1.5708]])\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_rotvec().shape\n",
        "execution_status": "success",
        "out": "(1, 3)\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRepresent multiple rotations in a single object:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r = R.from_quat([[0, 0, 1, 1], [1, 1, 0, 1]])\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_rotvec()\n",
        "execution_status": "failure",
        "out": "array([[0.     , 0.     , 1.5708 ],\n       [1.35102, 1.35102, 0.     ]])\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_rotvec().shape\n",
        "execution_status": "success",
        "out": "(2, 3)\n"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "self",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "degrees",
        "annotation": "bool",
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "False"
      }
    ],
    "return_annotation": "Array",
    "target_name": "as_rotvec"
  },
  "references": [
    ".. [1] https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation#Rotation_vector"
  ],
  "qa": "scipy.spatial.transform._rotation:Rotation.as_rotvec",
  "arbitrary": [],
  "local_refs": [
    "degrees",
    "rotvec"
  ]
}