{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "versionadded",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "versionadded 1.6.0"
                }
              ]
            }
          ]
        }
      ],
      "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": "mrps",
              "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 Modified Rodrigues Parameters (MRPs)."
            }
          ]
        }
      ],
      "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": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "MRPs are a 3 dimensional vector co-directional to the axis of rotation and whose magnitude is equal to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "tan(theta / 4)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", where "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "theta"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is the angle of rotation (in radians) "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "MRPs have a singularity at 360 degrees which can be avoided by ensuring the angle of rotation does not exceed 180 degrees, i.e. switching the direction of the rotation when it is past 180 degrees. This function will always return MRPs corresponding to a rotation of less than or equal to 180 degrees."
            }
          ]
        }
      ],
      "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": 1454,
  "item_type": "function",
  "aliases": [
    "scipy.spatial.transform.Rotation.as_mrp"
  ],
  "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_rotvec([0, 0, np.pi])\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_mrp()\n",
        "execution_status": "failure",
        "out": "array([0., 0., 1.])\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_mrp().shape\n",
        "execution_status": "success",
        "out": "(3,)\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRepresent a stack with a single rotation:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r = R.from_euler('xyz', [[180, 0, 0]], degrees=True)\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_mrp()\n",
        "execution_status": "failure",
        "out": "array([[1., 0., 0.]])\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_mrp().shape\n",
        "execution_status": "success",
        "out": "(1, 3)\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRepresent multiple rotations:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r = R.from_rotvec([[np.pi/2, 0, 0], [0, 0, np.pi/2]])\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_mrp()\n",
        "execution_status": "failure",
        "out": "array([[0.41421, 0.     , 0.     ],\n       [0.     , 0.     , 0.41421]])\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "r.as_mrp().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
        }
      }
    ],
    "return_annotation": "Array",
    "target_name": "as_mrp"
  },
  "references": [
    ".. [1] Shuster, M. D. \"A Survey of Attitude Representations\",",
    "       The Journal of Astronautical Sciences, Vol. 41, No.4, 1993,",
    "       pp. 475-476"
  ],
  "qa": "scipy.spatial.transform._rotation:Rotation.as_mrp",
  "arbitrary": [],
  "local_refs": [
    "mrps"
  ]
}