{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Public methods of an instance of a distribution class (e.g., "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "pdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "cdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") check their arguments and pass valid arguments to private, computational methods ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_pdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_cdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "). For "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "pdf(x)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "x"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is valid if it is within the support of the distribution. Whether a shape parameter is valid is decided by an "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_argcheck"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method (which defaults to checking that its arguments are strictly positive.)"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Subclassing"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "New random variables can be defined by subclassing the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "rv_continuous",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distn_infrastructure:rv_continuous"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " class and re-defining at least the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_pdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " or the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_cdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method (normalized to location 0 and scale 1)."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If positive argument checking is not correct for your RV then you will also need to re-define the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_argcheck"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For most of the scipy.stats distributions, the support interval doesn't depend on the shape parameters. "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "x"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " being in the support interval is equivalent to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "self.a <= x <= self.b"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ".  If either of the endpoints of the support do depend on the shape parameters, then i) the distribution must implement the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_get_support"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method; and ii) those dependent endpoints must be omitted from the distribution's call to the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "rv_continuous"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " initializer."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Correct, but potentially slow defaults exist for the remaining methods but for speed and/or accuracy you can over-ride    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "_logpdf, _cdf, _logcdf, _ppf, _rvs, _isf, _sf, _logsf",
          "execution_status": null,
          "out": ""
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The default method "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_rvs"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " relies on the inverse of the cdf, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_ppf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", applied to a uniform random variate. In order to generate random variates efficiently, either the default "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_ppf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " needs to be overwritten (e.g. if the inverse cdf can expressed in an explicit form) or a sampling method needs to be implemented in a custom "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_rvs"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If possible, you should override "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_isf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_sf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " or "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_logsf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". The main reason would be to improve numerical accuracy: for example, the survival function "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_sf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is computed as "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "1 - _cdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " which can result in loss of precision if "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_cdf(x)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is close to one."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Methods that can be overwritten by subclasses"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "     _rvs   _pdf   _cdf   _sf   _ppf   _isf   _stats   _munp   _entropy   _argcheck   _get_support"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "There are additional (internal and private) generic methods that can be useful for cross-checking and for debugging, but might work in all cases when directly called."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A note on "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "shapes"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ": subclasses need not specify them explicitly. In this case, "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "shapes"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " will be automatically deduced from the signatures of the overridden methods ("
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "pdf",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": null,
                "version": null,
                "kind": "local",
                "path": "pdf"
              },
              "kind": "local"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "cdf",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": null,
                "version": null,
                "kind": "local",
                "path": "cdf"
              },
              "kind": "local"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " etc). If, for some reason, you prefer to avoid relying on introspection, you can specify "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "shapes"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " explicitly as an argument to the instance constructor."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Frozen Distributions"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Normally, you must provide shape parameters (and, optionally, location and scale parameters to each call of a method of a distribution."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Alternatively, the object may be called (as a function) to fix the shape, location, and scale parameters returning a \"frozen\" continuous RV object:"
            }
          ]
        },
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "rv = generic(<shape(s)>, loc=0, scale=1)"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "rv_frozen",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._distn_infrastructure:rv_frozen"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " object with the same methods but holding the given shape,     location, and scale fixed"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Statistics"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Statistics are computed using numerical integration by default. For speed you can redefine this using "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_stats"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ":"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "take shape parameters and return mu, mu2, g1, g2"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If you can't compute one of these, return it as None"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Can also be defined with a keyword argument "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "moments"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", which is a   string composed of \"m\", \"v\", \"s\", and/or \"k\".   Only the components appearing in string should be computed and   returned in the order \"m\", \"v\", \"s\", or \"k\"  with missing values   returned as None."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Alternatively, you can override "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_munp"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", which takes "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "n"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and shape parameters and returns the n-th non-central moment of the distribution."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Deepcopying / Pickling"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If a distribution or frozen distribution is deepcopied (pickled/unpickled, etc.), any underlying random number generator is deepcopied with it. An implication is that if a distribution relies on the singleton RandomState before copying, it will rely on a copy of that random state after copying, and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.random.seed"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " will no longer control the state."
            }
          ]
        }
      ],
      "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": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "rvs",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "pdf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "logpdf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "cdf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "logcdf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "sf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "logsf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "ppf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "isf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "moment",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "stats",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "entropy",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "expect",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "median",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "mean",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "std",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "var",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "interval",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "__call__",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "fit",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "fit_loc_scale",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "nnlf",
              "annotation": "",
              "desc": []
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "support",
              "annotation": "",
              "desc": []
            }
          ]
        }
      ],
      "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": "A generic continuous random variable class meant for subclassing."
            }
          ]
        }
      ],
      "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": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "a, b",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Lower/upper bound of the support of the unshifted/unscaled distribution. This value is unaffected by the "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "loc",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "scale",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._qmc:scale"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " parameters. To calculate the support of the shifted/scaled distribution, use the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "support",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "support"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "momtype",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The type of generic moment calculation to use: 0 for pdf, 1 (default) for ppf."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "a",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Lower bound of the support of the distribution, default is minus infinity."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "b",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Upper bound of the support of the distribution, default is plus infinity."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "xtol",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The tolerance for fixed point calculation for generic ppf."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "badvalue",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The value in a result arrays that indicates a value that for which some argument restriction is violated, default is np.nan."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "name",
              "annotation": "str, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The name of the instance. This string is used to construct the default example for distributions."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "longname",
              "annotation": "str, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This string is used as part of the first line of the docstring returned when a subclass has no docstring of its own. Note: "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "longname"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " exists for backwards compatibility, do not use for new subclasses."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "shapes",
              "annotation": "str, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The shape of the distribution. For example "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "\"m, n\""
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " for a distribution that takes two integers as the two shape arguments for all its methods. If not provided, shape parameters will be inferred from the signature of the private methods, "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "_pdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "_cdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of the instance."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "seed",
              "annotation": "{None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "seed"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is None (or "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "np.random",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "), the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.random.RandomState",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "?",
                        "kind": "module",
                        "path": "numpy.random.mtrand:RandomState"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " singleton is used. If "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "seed"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is an int, a new "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "RandomState"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " instance is used, seeded with "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "seed"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". If "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "seed"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is already a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Generator"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "RandomState"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " instance then that instance is used."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "rv_continuous",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distn_infrastructure:rv_continuous"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a base class to construct specific distribution classes and instances for continuous random variables. It cannot be used directly as a distribution."
            }
          ]
        }
      ],
      "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/stats/_distn_infrastructure.py",
  "item_line": 1669,
  "item_type": "class",
  "aliases": [
    "scipy.stats.rv_continuous"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "To create a new Gaussian distribution, we would do the following:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "from scipy.stats import rv_continuous\nclass gaussian_gen(rv_continuous):\n    \"Gaussian distribution\"\n    def _pdf(self, x):\n        return np.exp(-x**2 / 2.) / np.sqrt(2.0 * np.pi)\ngaussian = gaussian_gen(name='gaussian')\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\n``scipy.stats`` distributions are *instances*, so here we subclass\n`rv_continuous` and create an instance. With this, we now have\na fully functional distribution with all relevant methods automagically\ngenerated by the framework.\n\nNote that above we defined a standard normal distribution, with zero mean\nand unit variance. Shifting and scaling of the distribution can be done\nby using ``loc`` and ``scale`` parameters: ``gaussian.pdf(x, loc, scale)``\nessentially computes ``y = (x - loc) / scale`` and\n``gaussian._pdf(y) / scale``."
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "momtype",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "1"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "a",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "b",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "xtol",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "1e-14"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "badvalue",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "name",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "longname",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "shapes",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "seed",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "rv_continuous"
  },
  "references": null,
  "qa": "scipy.stats._distn_infrastructure:rv_continuous",
  "arbitrary": [],
  "local_refs": [
    "__call__",
    "a",
    "b",
    "badvalue",
    "cdf",
    "entropy",
    "expect",
    "fit",
    "fit_loc_scale",
    "interval",
    "isf",
    "logcdf",
    "logpdf",
    "logsf",
    "longname",
    "mean",
    "median",
    "moment",
    "momtype",
    "name",
    "nnlf",
    "pdf",
    "ppf",
    "rvs",
    "seed",
    "sf",
    "shapes",
    "stats",
    "std",
    "support",
    "var",
    "xtol"
  ]
}