{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Note that the "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "fcn"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "fjacb"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", and "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "fjacd"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " operate on NumPy arrays and return a NumPy array. The "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "estimate"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " object takes an instance of the Data class."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Here are the rules for the shapes of the argument and return arrays of the callback functions:"
            }
          ]
        },
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineRole",
                    "__tag": 4003,
                    "value": "x",
                    "domain": null,
                    "role": null,
                    "inventory": null
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "if the input data is single-dimensional, then "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "x",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is rank-1     array; i.e., "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x = array([1, 2, 3, ...]); x.shape = (n,)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     If the input data is multi-dimensional, then "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "x",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a rank-2 array;     i.e., "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x = array([[1, 2, ...], [2, 4, ...]]); x.shape = (m, n)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ".     In all cases, it has the same shape as the input data array passed to     "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "odr",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.odr.odrpack"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "m",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the dimensionality of the input data,     "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "n",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the number of observations."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineRole",
                    "__tag": 4003,
                    "value": "y",
                    "domain": null,
                    "role": null,
                    "inventory": null
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "if the response variable is single-dimensional, then "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "y",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a     rank-1 array, i.e., "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "y = array([2, 4, ...]); y.shape = (n,)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ".     If the response variable is multi-dimensional, then "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "y",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a rank-2     array, i.e., "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "y = array([[2, 4, ...], [3, 6, ...]]); y.shape =     (q, n)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " where "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "q",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the dimensionality of the response variable."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "CrossRef",
                    "__tag": 4002,
                    "value": "beta",
                    "reference": {
                      "__type": "LocalRef",
                      "__tag": 4022,
                      "kind": "module",
                      "path": "scipy.special.cython_special:beta"
                    },
                    "kind": "module"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "rank-1 array of length "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "p",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " where "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "p",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the number of parameters;     i.e. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "beta = array([B_1, B_2, ..., B_p])"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "ParamRef",
                    "__tag": 4071,
                    "name": "fjacb"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "if the response variable is multi-dimensional, then the     return array's shape is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(q, p, n)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " such that "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "fjacb(beta,x)[l,k,i] =     d f_l(beta,x)/d B_k"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " evaluated at the ith data point.  If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "q == 1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", then     the return array is only rank-2 and with shape "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(p, n)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "ParamRef",
                    "__tag": 4071,
                    "name": "fjacd"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "as with fjacb, only the return array's shape is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(q, m, n)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "     such that "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "fjacd(beta,x)[l,j,i] = d f_l(beta,x)/d X_j"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " at the ith data     point.  If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "q == 1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", then the return array's shape is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(m, n)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". If     "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "m == 1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the shape is (q, n). If "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "m == q == 1",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the shape is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(n,)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The Model class stores information about the function you wish to fit."
            }
          ]
        }
      ],
      "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": "fcn",
              "annotation": "function",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "fcn(beta, x) --> y"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "fjacb",
              "annotation": "function",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Jacobian of fcn wrt the fit parameters beta."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "fjacb(beta, x) --> @f_i(x,B)/@B_j"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "fjacd",
              "annotation": "function",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Jacobian of fcn wrt the (possibly multidimensional) input variable."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "fjacd(beta, x) --> @f_i(x,B)/@x_j"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "extra_args",
              "annotation": "tuple, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If specified, "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "extra_args"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " should be a tuple of extra arguments to pass to "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "fcn"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "fjacb"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", and "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "fjacd"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Each will be called by "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "apply(fcn, (beta, x) + extra_args)",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "estimate",
              "annotation": "array_like of rank-1",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Provides estimates of the fit parameters from the data"
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "estimate(data) --> estbeta"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "implicit",
              "annotation": "boolean",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If TRUE, specifies that the model is implicit; i.e "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "fcn(beta, x)",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " ~= 0 and there is no y data to fit against"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "meta",
              "annotation": "dict, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "freeform dictionary of metadata for the model"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "deprecated",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "deprecated 1.17.0"
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "CrossRef",
                  "__tag": 4002,
                  "value": "scipy.odr",
                  "reference": {
                    "__type": "LocalRef",
                    "__tag": 4022,
                    "kind": "module",
                    "path": "scipy.odr"
                  },
                  "kind": "module"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " is deprecated and will be removed in SciPy 1.19.0. Please use "
                },
                {
                  "__type": "Link",
                  "__tag": 4049,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "pypi.org/project/odrpack/"
                    }
                  ],
                  "url": "https://pypi.org/project/odrpack/",
                  "title": ""
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " instead."
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "It stores the function itself, at the least, and optionally stores functions which compute the Jacobians used during fitting. Also, one can provide a function that will provide reasonable starting values for the fit parameters possibly given the set of data."
            }
          ]
        }
      ],
      "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/odr/_odrpack.py",
  "item_line": 461,
  "item_type": "class",
  "aliases": [
    "scipy.odr.Model"
  ],
  "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": "fcn",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "fjacb",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "fjacd",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "extra_args",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "estimate",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "implicit",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "0"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "meta",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "Model"
  },
  "references": null,
  "qa": "scipy.odr._odrpack:Model",
  "arbitrary": [],
  "local_refs": [
    "estimate",
    "extra_args",
    "fcn",
    "fjacb",
    "fjacd",
    "implicit",
    "meta"
  ]
}