{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The documentation of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "UnivariateDistribution",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distribution_infrastructure:UnivariateDistribution"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is not rendered. See below for an example of how to instantiate the class (i.e. pass all shape parameters of "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "dist"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to the initializer as keyword arguments). Documentation of all methods is identical to that of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "scipy.stats.Normal",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "scipy",
                "version": "?",
                "kind": "module",
                "path": "scipy.stats._new_distributions:Normal"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". Use "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "help"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " on the returned class or its methods for more information."
            }
          ]
        }
      ],
      "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": "CustomDistribution",
              "annotation": "`UnivariateDistribution`",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A subclass of "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "UnivariateDistribution",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._distribution_infrastructure:UnivariateDistribution"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " corresponding with "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "dist"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The initializer requires all shape parameters to be passed as keyword arguments (using the same names as the instance of "
                    },
                    {
                      "__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": "/"
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "rv_discrete",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._distn_infrastructure:rv_discrete"
                      },
                      "kind": "module"
                    },
                    {
                      "__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": "Generate a "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "UnivariateDistribution",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distribution_infrastructure:UnivariateDistribution"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " class from a compatible object."
            }
          ]
        }
      ],
      "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": "dist",
              "annotation": "`rv_continuous`",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Instance of "
                    },
                    {
                      "__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": ", "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "rv_discrete",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._distn_infrastructure:rv_discrete"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", or an instance of any custom class with the following attributes:"
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "__make_distribution_version__"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "A string containing the version number of SciPy in which this interface     is defined. The preferred interface may change in future SciPy versions,     in which case support for an old interface version may be deprecated     and eventually removed."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "parameters"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "If a dictionary, each key is the name of a parameter,     and the corresponding value is either a dictionary or tuple.     If the value is a dictionary, it may have the following items, with default     values used for entries which aren't present."
                            }
                          ]
                        },
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": "domain_type"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "A string identifying whether the domain of the parameter is continuous         or discrete (i.e. accepts only integral values)."
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": "endpoints"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "A tuple defining the lower and upper endpoints of the domain of the         parameter; allowable values are floats, the name (string) of another         parameter, or a callable taking parameters as keyword only         arguments and returning the numerical value of an endpoint for         given parameter values."
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": "inclusive"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "A tuple specifying whether the endpoints are included within the domain         of the parameter."
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": "typical"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Defining endpoints of a typical range of values of a parameter. Can be         used for sampling parameter values for testing. Behaves like the         "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "endpoints"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " tuple above, and should define a subinterval of the         domain given by "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "endpoints"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "A tuple value "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "(a, b)"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " associated to a key in the "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "parameters"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "     dictionary is equivalent to "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "{endpoints: (a, b)}"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        },
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Custom distributions with multiple parameterizations can be defined by     having the "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "parameters"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " attribute be a tuple of dictionaries with     the structure described above. In this case, "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "dist"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "'s class must also     define a method "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "process_parameters"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " to map between the different     parameterizations. It must take all parameters from all parameterizations     as optional keyword arguments and return a dictionary mapping parameters to     values, filling in values from other parameterizations using values from     the supplied parameterization. See example."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "support"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "A dictionary describing the support of the distribution or a tuple     describing the endpoints of the support. This behaves identically to     the values of the parameters dict described above. ("
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "domain_type"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " is     inferred from whether "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "pdf"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " or "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "pmf"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " is defined.)"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The class "
                    },
                    {
                      "__type": "Strong",
                      "__tag": 4048,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "must"
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " also define a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "pdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " OR "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "pmf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method - not both - and this determines whether the support of the distribution is continuous or discrete (i.e. accepts only integral values). It "
                    },
                    {
                      "__type": "Strong",
                      "__tag": 4048,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "may"
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " define methods "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "logentropy"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "entropy"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "median"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "mode"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "logpdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "logpmf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "logcdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "cdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "logccdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ccdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ilogcdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "icdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "ilogccdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "iccdf"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "moment"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "lmoment"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "sample"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". If defined, these methods must accept the parameters of the distribution as keyword arguments and also accept any positional-only arguments accepted by the corresponding method of "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "ContinuousDistribution",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._distribution_infrastructure:ContinuousDistribution"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "/"
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "DiscreteDistribution",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.stats._distribution_infrastructure:DiscreteDistribution"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". When multiple parameterizations are defined, these methods must accept all parameters from all parameterizations. The "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "moment"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method must accept the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "order"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "kind"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " arguments by position or keyword, but may return "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " if a formula is not available for the arguments; in this case, the infrastructure will fall back to a default implementation. The "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "lmoment"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method must accept the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "order"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " argument by position or keyword and return the specified L-moment (not the L-moment ratio), but may return "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " if a formula is not available for the arguments. The "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "sample"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method must accept "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " by position or keyword, but contrary to the public method of the same name, the argument it receives will be the "
                    },
                    {
                      "__type": "Emphasis",
                      "__tag": 4047,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "full"
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " shape of the output array - that is, the shape passed to the public method prepended to the broadcasted shape of random variable parameters."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The argument may be an instance of "
            },
            {
              "__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": ", "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "rv_discrete",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distn_infrastructure:rv_discrete"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", or an instance of another class that satisfies the interface described below."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The returned value is a "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ContinuousDistribution",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distribution_infrastructure:ContinuousDistribution"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " subclass if the input defines a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "pdf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method or a "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "DiscreteDistribution",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distribution_infrastructure:DiscreteDistribution"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " subclass if the input defines a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "pmf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " method. Like any subclass of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "UnivariateDistribution",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distribution_infrastructure:UnivariateDistribution"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", it must be instantiated (i.e. by passing all shape parameters as keyword arguments) before use. Once instantiated, the resulting object will have the same interface as any other instance of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "UnivariateDistribution",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.stats._distribution_infrastructure:UnivariateDistribution"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "; e.g., "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "scipy.stats.Normal",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "scipy",
                "version": "?",
                "kind": "module",
                "path": "scipy.stats._new_distributions:Normal"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "scipy.stats.Binomial",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "scipy",
                "version": "?",
                "kind": "module",
                "path": "scipy.stats._new_distributions:Binomial"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "note",
          "base_type": "note",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "note "
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "CrossRef",
                  "__tag": 4002,
                  "value": "make_distribution",
                  "reference": {
                    "__type": "LocalRef",
                    "__tag": 4022,
                    "kind": "module",
                    "path": "scipy.stats._distribution_infrastructure:make_distribution"
                  },
                  "kind": "module"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " does not work perfectly with all instances of "
                },
                {
                  "__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": " or "
                },
                {
                  "__type": "CrossRef",
                  "__tag": 4002,
                  "value": "rv_discrete",
                  "reference": {
                    "__type": "LocalRef",
                    "__tag": 4022,
                    "kind": "module",
                    "path": "scipy.stats._distn_infrastructure:rv_discrete"
                  },
                  "kind": "module"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ". Known failures include "
                },
                {
                  "__type": "InlineRole",
                  "__tag": 4003,
                  "value": "levy_stable",
                  "domain": null,
                  "role": null,
                  "inventory": null
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ", "
                },
                {
                  "__type": "InlineRole",
                  "__tag": 4003,
                  "value": "vonmises",
                  "domain": null,
                  "role": null,
                  "inventory": null
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ", "
                },
                {
                  "__type": "InlineRole",
                  "__tag": 4003,
                  "value": "hypergeom",
                  "domain": null,
                  "role": null,
                  "inventory": null
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ", 'nchypergeom_fisher', 'nchypergeom_wallenius', and "
                },
                {
                  "__type": "InlineRole",
                  "__tag": 4003,
                  "value": "poisson_binom",
                  "domain": null,
                  "role": null,
                  "inventory": null
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ". Some methods of some distributions will not support array shape parameters."
                }
              ]
            }
          ]
        }
      ],
      "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/_distribution_infrastructure.py",
  "item_line": 3853,
  "item_type": "function",
  "aliases": [
    "scipy.stats.make_distribution"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy import stats, special\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCreate a `ContinuousDistribution` from `scipy.stats.loguniform`.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "LogUniform = stats.make_distribution(stats.loguniform)\nX = LogUniform(a=1.0, b=3.0)\nnp.isclose((X + 0.25).median(), stats.loguniform.ppf(0.5, 1, 3, loc=0.25))\n",
        "execution_status": "success",
        "out": "np.True_\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "X.plot()\n",
        "execution_status": "failure",
        "out": "<Axes: title={'center': 'LogUniform(a=1.0, b=3.0)'}, xlabel='$x$', ylabel='$pdf$'>\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "sample = X.sample(10000, rng=np.random.default_rng())\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.hist(sample, density=True, bins=30)\nplt.legend(('pdf', 'histogram'))\n",
        "execution_status": "failure",
        "out": "<matplotlib.legend.Legend object at 0x7f3f60ccd7f0>\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.show()\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Figure",
        "__tag": 4024,
        "value": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "scipy",
          "version": "2.0.0.dev0+git20260907.41eeb59",
          "kind": "assets",
          "path": "fig-bbbe27cb8fdd96f7.png"
        }
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCreate a custom continuous distribution.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "class MyLogUniform:\n    @property\n    def __make_distribution_version__(self):\n        return \"1.16.0\"\n\n    @property\n    def parameters(self):\n        return {'a': {'endpoints': (0, np.inf),\n                      'inclusive': (False, False)},\n                'b': {'endpoints': ('a', np.inf),\n                      'inclusive': (False, False)}}\n\n    @property\n    def support(self):\n        return {'endpoints': ('a', 'b'), 'inclusive': (True, True)}\n\n    def pdf(self, x, a, b):\n        return 1 / (x * (np.log(b)- np.log(a)))\nMyLogUniform = stats.make_distribution(MyLogUniform())\nY = MyLogUniform(a=1.0, b=3.0)\nnp.isclose(Y.cdf(2.), X.cdf(2.))\n",
        "execution_status": "success",
        "out": "np.True_\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCreate a custom distribution with variable support.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "class MyUniformCube:\n    @property\n    def __make_distribution_version__(self):\n        return \"1.16.0\"\n\n    @property\n    def parameters(self):\n        return {\"a\": (-np.inf, np.inf),\n                \"b\": {'endpoints':('a', np.inf), 'inclusive':(True, False)}}\n\n    @property\n    def support(self):\n        def left(*, a, b):\n            return a**3\n\n        def right(*, a, b):\n            return b**3\n        return (left, right)\n\n    def pdf(self, x, *, a, b):\n        return 1 / (3*(b - a)*np.cbrt(x)**2)\n\n    def cdf(self, x, *, a, b):\n        return (np.cbrt(x) - a) / (b - a)\nMyUniformCube = stats.make_distribution(MyUniformCube())\nX = MyUniformCube(a=-2, b=2)\nY = stats.Uniform(a=-2, b=2)**3\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "X.support()\n",
        "execution_status": "failure",
        "out": "(np.float64(-8.0), np.float64(8.0))\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.isclose(X.cdf(2.1), Y.cdf(2.1))\n",
        "execution_status": "success",
        "out": "np.True_\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCreate a custom distribution with multiple parameterizations. Here we create a\ncustom version of the beta distribution that has an alternative parameterization\nin terms of the mean ``mu`` and a dispersion parameter ``nu``.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "class MyBeta:\n    @property\n    def __make_distribution_version__(self):\n        return \"1.16.0\"\n\n    @property\n    def parameters(self):\n        return ({\"a\": (0, np.inf), \"b\": (0, np.inf)},\n                {\"mu\": (0, 1), \"nu\": (0, np.inf)})\n\n    def process_parameters(self, a=None, b=None, mu=None, nu=None):\n        if a is not None and b is not None:\n            nu = a + b\n            mu = a / nu\n        else:\n            a = mu * nu\n            b = nu - a\n        return dict(a=a, b=b, mu=mu, nu=nu)\n\n    @property\n    def support(self):\n        return {'endpoints': (0, 1)}\n\n    def pdf(self, x, a, b, mu, nu):\n        return special._ufuncs._beta_pdf(x, a, b)\n\n    def cdf(self, x, a, b, mu, nu):\n        return special.betainc(a, b, x)\nMyBeta = stats.make_distribution(MyBeta())\nX = MyBeta(a=2.0, b=2.0)\nY = MyBeta(mu=0.5, nu=4.0)\nnp.isclose(X.pdf(0.3), Y.pdf(0.3))\n",
        "execution_status": "success",
        "out": "np.True_\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCreate a custom discrete distribution with one continuous shape parameter and one\ndiscrete shape parameter.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "class MyBinomial:\n    @property\n    def __make_distribution_version__(self):\n        return \"1.16.0\"\n\n    @property\n    def parameters(self):\n        return {'n': {'domain_type': 'discrete',\n                      'endpoints': (0., np.inf),\n                      'inclusive': (True, False)},\n                'p': {'domain_type': 'continuous',\n                      'endpoints': (0., 1.),\n                      'inclusive': (True, True)}}\n\n    @property\n    def support(self):\n        return {'endpoints': (0, 'n'), 'inclusive': (True, True)}\n\n    def pmf(self, x, n, p):\n        return special.binom(n, x) * p**x * (1 - p)**(n-x)\nMyBinomial = stats.make_distribution(MyBinomial())\nX = stats.Binomial(n=10, p=0.4)\nY = MyBinomial(n=10, p=0.4)\nnp.isclose(Y.cdf(8.), X.cdf(8.))\n",
        "execution_status": "success",
        "out": "np.True_\n"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "dist",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "make_distribution"
  },
  "references": null,
  "qa": "scipy.stats._distribution_infrastructure:make_distribution",
  "arbitrary": [],
  "local_refs": [
    "CustomDistribution",
    "dist"
  ]
}