Repository: scipy/scipy
File: scipy/stats/_distribution_infrastructure.py (Python)

Code before:
    .. note::

        `make_distribution` does not work perfectly with all instances of
        `rv_continuous`. Known failures include `levy_stable` and `vonmises`,
        and some methods of some distributions will not support array shape
        parameters.

    Parameters
    ----------
    dist : `rv_continuous`
        Instance of `rv_continuous` OR an instance of any class with the following
        attributes:

        __make_distribution_version__ : str
            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.
        parameters : dict
            A dictionary describing the parameters of the distribution.
            Each key is the name of a parameter,
            and the corresponding value is itself a dictionary with the following items.

            endpoints : tuple
                A tuple defining the lower and upper endpoints of the domain of the
                parameter; allowable values are floats or the name (string) of another
                parameter.

            inclusive : tuple of bool
                A tuple specifying whether the endpoints are included within the domain
                of the parameter.

        support : tuple or method.
            A tuple defining the lower and upper endpoints of the support of the
            distribution or a callable which calculates such a tuple based on the
            parameter values. If a tuple, values can be floats or the name (string)
            of a parameter. If ``support`` is defined as a method, it must take the
            parameter names as keyword arguments and return a 2-tuple giving the
            numerical lower and upper endpoints of the support for fixed values of
            the parameters.

        The class **must** also define a ``pdf`` method and **may** define methods
        ``logentropy``, ``entropy``, ``median``, ``mode``, ``logpdf``,
        ``logcdf``, ``cdf``, ``logccdf``, ``ccdf``,
        ``ilogcdf``, ``icdf``, ``ilogccdf``, and ``iccdf``.
        If defined, these methods must accept the parameters of the distributions as
        keyword arguments and also accept any positional-only arguments accepted by
        the corresponding method of `ContinuousDistribution`. Methods ``moment_raw``,
        ``moment_central``, ``moment_standardized`` may also be defined; if so,
        they must accept the ``order`` of the moment by position, accept all
        distribution parameters by keyword, and return the raw, central, and

Review comment (suggestion):
Oops. I didn't mean to change this. This happened because I'd accidentally documented `endpoints` as taking a method here instead of `support`, and the semicolon seemed to make things flow better after adding an additional sentence on `method` values of `endpoints`, since it make the linking of the first two sentence more clear.

```suggestion
                parameter. Allowable values are floats or the name (string) of another
```

Code after:

        `make_distribution` does not work perfectly with all instances of
        `rv_continuous`. Known failures include `levy_stable` and `vonmises`,
        and some methods of some distributions will not support array shape
        parameters.

    Parameters
    ----------
    dist : `rv_continuous`
        Instance of `rv_continuous` OR an instance of any class with the following
        attributes:

        __make_distribution_version__ : str
            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.
        parameters : dict
            A dictionary describing the parameters of the distribution.
            Each key is the name of a parameter,
            and the corresponding value is itself a dictionary with the following items.

            endpoints : tuple
                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.

            inclusive : tuple of bool
                A tuple specifying whether the endpoints are included within the domain
                of the parameter.

        support : dict
            A dictionary describing the support of the distribution. It has items
            "endpoints" and "inclusive" with the same structure as the matching
            items in the values of the parameters dict described above.

        The class **must** also define a ``pdf`` method and **may** define methods
        ``logentropy``, ``entropy``, ``median``, ``mode``, ``logpdf``,
        ``logcdf``, ``cdf``, ``logccdf``, ``ccdf``,
        ``ilogcdf``, ``icdf``, ``ilogccdf``, and ``iccdf``.
        If defined, these methods must accept the parameters of the distributions as
        keyword arguments and also accept any positional-only arguments accepted by
        the corresponding method of `ContinuousDistribution`. Methods ``moment_raw``,
        ``moment_central``, ``moment_standardized`` may also be defined; if so,
        they must accept the ``order`` of the moment by position, accept all
        distribution parameters by keyword, and return the raw, central, and
        standardized moments of the distribution, respectively.

    Returns