{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Uses iterative refinements described in [1] during the computation of "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "Z"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " in order to cope with the possibility of large roundoff errors."
            }
          ]
        }
      ],
      "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": "Z",
              "annotation": "LinearOperator, shape (n, n)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Null-space operator. For a given vector "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the null space operator is equivalent to apply a projection matrix "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "P = I - A.T inv(A A.T) A"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to the vector. It can be shown that this is equivalent to project "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " into the null space of A."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "LS",
              "annotation": "LinearOperator, shape (m, n)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Least-squares operator. For a given vector "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the least-squares operator is equivalent to apply a pseudoinverse matrix "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "pinv(A.T) = inv(A A.T) A"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to the vector. It can be shown that this vector "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "pinv(A.T) x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the least_square solution to "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A.T y = x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "Y",
              "annotation": "LinearOperator, shape (n, m)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Row-space operator. For a given vector "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the row-space operator is equivalent to apply a projection matrix "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Q = A.T inv(A A.T)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to the vector.  It can be shown that this vector "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "y = Q x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "  the minimum norm solution of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A y = x"
                    },
                    {
                      "__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": "Return three linear operators related with a given matrix 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": "sparse array (or ndarray), shape (m, n)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Matrix "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " used in the projection."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "method",
              "annotation": "string, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Method used for compute the given linear operators. Should be one of:"
                    }
                  ]
                },
                {
                  "__type": "Blockquote",
                  "__tag": 4059,
                  "children": [
                    {
                      "__type": "BulletList",
                      "__tag": 4053,
                      "ordered": false,
                      "start": 1,
                      "children": [
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "DefList",
                              "__tag": 4033,
                              "children": [
                                {
                                  "__type": "DefListItem",
                                  "__tag": 4037,
                                  "dt": {
                                    "__type": "Paragraph",
                                    "__tag": 4045,
                                    "children": [
                                      {
                                        "__type": "Text",
                                        "__tag": 4046,
                                        "value": "'NormalEquation': The operators"
                                      }
                                    ]
                                  },
                                  "dd": [
                                    {
                                      "__type": "Paragraph",
                                      "__tag": 4045,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "will be computed using the        so-called normal equation approach        explained in "
                                        },
                                        {
                                          "__type": "FootnoteReference",
                                          "__tag": 4066,
                                          "label": "1"
                                        },
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": ". In order to do        so the Cholesky factorization of        "
                                        },
                                        {
                                          "__type": "InlineCode",
                                          "__tag": 4051,
                                          "value": "(A A.T)"
                                        },
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": " is computed. Exclusive        for sparse matrices."
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "DefList",
                              "__tag": 4033,
                              "children": [
                                {
                                  "__type": "DefListItem",
                                  "__tag": 4037,
                                  "dt": {
                                    "__type": "Paragraph",
                                    "__tag": 4045,
                                    "children": [
                                      {
                                        "__type": "Text",
                                        "__tag": 4046,
                                        "value": "'AugmentedSystem': The operators"
                                      }
                                    ]
                                  },
                                  "dd": [
                                    {
                                      "__type": "Paragraph",
                                      "__tag": 4045,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "will be computed using the        so-called augmented system approach        explained in "
                                        },
                                        {
                                          "__type": "FootnoteReference",
                                          "__tag": 4066,
                                          "label": "1"
                                        },
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": ". Exclusive        for sparse matrices."
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "DefList",
                              "__tag": 4033,
                              "children": [
                                {
                                  "__type": "DefListItem",
                                  "__tag": 4037,
                                  "dt": {
                                    "__type": "Paragraph",
                                    "__tag": 4045,
                                    "children": [
                                      {
                                        "__type": "Text",
                                        "__tag": 4046,
                                        "value": "'QRFactorization': Compute projections"
                                      }
                                    ]
                                  },
                                  "dd": [
                                    {
                                      "__type": "Paragraph",
                                      "__tag": 4045,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "using QR factorization. Exclusive for        dense matrices."
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "DefList",
                              "__tag": 4033,
                              "children": [
                                {
                                  "__type": "DefListItem",
                                  "__tag": 4037,
                                  "dt": {
                                    "__type": "Paragraph",
                                    "__tag": 4045,
                                    "children": [
                                      {
                                        "__type": "Text",
                                        "__tag": 4046,
                                        "value": "'SVDFactorization': Compute projections"
                                      }
                                    ]
                                  },
                                  "dd": [
                                    {
                                      "__type": "Paragraph",
                                      "__tag": 4045,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "using SVD factorization. Exclusive for        dense matrices."
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "orth_tol",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Tolerance for iterative refinements."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "max_refin",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Maximum number of iterative refinements."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "tol",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Tolerance for singular values."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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/optimize/_trustregion_constr/projections.py",
  "item_line": 295,
  "item_type": "function",
  "aliases": [
    "scipy.optimize._trustregion_constr.equality_constrained_sqp.projections"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "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
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "method",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "orth_tol",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "1e-12"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "max_refin",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "3"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "tol",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "1e-15"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "projections"
  },
  "references": [
    ".. [1] Gould, Nicholas IM, Mary E. Hribar, and Jorge Nocedal.",
    "    \"On the solution of equality constrained quadratic",
    "    programming problems arising in optimization.\"",
    "    SIAM Journal on Scientific Computing 23.4 (2001): 1376-1395."
  ],
  "qa": "scipy.optimize._trustregion_constr.projections:projections",
  "arbitrary": [],
  "local_refs": [
    "A",
    "LS",
    "Y",
    "Z",
    "max_refin",
    "method",
    "orth_tol",
    "tol"
  ]
}