Repository: scipy/scipy
File: scipy/stats/tests/test_continuous.py (Python)

Code before:
                )**(1/c[~mask])
                return np.exp(-t)[()]

        GenExtreme1 = stats.make_distribution(MyGenExtreme())
        GenExtreme2 = stats.make_distribution(stats.genextreme)

        X1 = GenExtreme1(c=c, mu=0, sigma=1)
        X2 = GenExtreme2(c=c)

        x = X1.sample(shape=10, rng=rng)
        p = X1.cdf(x)

        assert_allclose(X1.support(), X2.support())
        assert_allclose(X1.entropy(), X2.entropy(), rtol=5e-6)
        assert_allclose(X1.median(), X2.median())
        assert_allclose(X1.logpdf(x), X2.logpdf(x))
        assert_allclose(X1.pdf(x), X2.pdf(x))
        assert_allclose(X1.logcdf(x), X2.logcdf(x))
        assert_allclose(X1.cdf(x), X2.cdf(x))
        assert_allclose(X1.logccdf(x), X2.logccdf(x))
        assert_allclose(X1.ccdf(x), X2.ccdf(x))
        assert_allclose(X1.icdf(p), X2.icdf(p))
        assert_allclose(X1.iccdf(p), X2.iccdf(p))

    @pytest.mark.parametrize("a", [0.5, 1.0, 2.0, 4.0, 8.0])
    @pytest.mark.parametrize("b", [0.5, 1.0, 2.0, 4.0, 8.0])
    def test_custom_multiple_parameterizations(self, a, b):
        rng = np.random.default_rng(7548723590230982)
        class MyBeta:
            @property
            def __make_distribution_version__(self):
                return "1.16.0"

            @property
            def parameters(self):
                return (
                    {"a": (0, np.inf), "b": (0, np.inf)},
                    {"mu": (0, 1), "nu": (0, np.inf)},
                )

            def process_parameters(self, a=None, b=None, mu=None, nu=None):
                if a is not None and b is not None and mu is None and nu is None:
                    nu = a + b
                    mu = a / nu
                else:
                    a = mu * nu
                    b = nu - a
                return {"a": a, "b": b, "mu": mu, "nu": nu}

            @property
            def support(self):

Review comment (suggestion):
To save some test time and strengthen the test, maybe:
```suggestion
    @pytest.mark.parametrize("a", [0.5, np.asarray([0.5, 1.0, 2.0, 4.0, 8.0])])
    @pytest.mark.parametrize("b", [0.5, np.asarray([0.5, 1.0, 2.0, 4.0, 8.0])])
```
That way we test with arrays and not just scalars, but we only run the test four times instead of 25.

Code after:
                )**(1/c[~mask])
                return np.exp(-t)[()]

        GenExtreme1 = stats.make_distribution(MyGenExtreme())
        GenExtreme2 = stats.make_distribution(stats.genextreme)

        X1 = GenExtreme1(c=c, mu=0, sigma=1)
        X2 = GenExtreme2(c=c)

        x = X1.sample(shape=10, rng=rng)
        p = X1.cdf(x)

        assert_allclose(X1.support(), X2.support())
        assert_allclose(X1.entropy(), X2.entropy(), rtol=5e-6)
        assert_allclose(X1.median(), X2.median())
        assert_allclose(X1.logpdf(x), X2.logpdf(x))
        assert_allclose(X1.pdf(x), X2.pdf(x))
        assert_allclose(X1.logcdf(x), X2.logcdf(x))
        assert_allclose(X1.cdf(x), X2.cdf(x))
        assert_allclose(X1.logccdf(x), X2.logccdf(x))
        assert_allclose(X1.ccdf(x), X2.ccdf(x))
        assert_allclose(X1.icdf(p), X2.icdf(p))
        assert_allclose(X1.iccdf(p), X2.iccdf(p))

    @pytest.mark.parametrize("a", [0.5, np.asarray([0.5, 1.0, 2.0, 4.0, 8.0])])
    @pytest.mark.parametrize("b", [0.5, np.asarray([0.5, 1.0, 2.0, 4.0, 8.0])])
    def test_custom_multiple_parameterizations(self, a, b):
        rng = np.random.default_rng(7548723590230982)
        class MyBeta:
            @property
            def __make_distribution_version__(self):
                return "1.16.0"

            @property
            def parameters(self):
                return (
                    {"a": (0, np.inf), "b": (0, np.inf)},
                    {"mu": (0, 1), "nu": (0, np.inf)},
                )

            def process_parameters(self, a=None, b=None, mu=None, nu=None):
                if a is not None and b is not None and mu is None and nu is None:
                    nu = a + b
                    mu = a / nu
                else:
                    a = mu * nu
                    b = nu - a
                return {"a": a, "b": b, "mu": mu, "nu": nu}

            @property
            def support(self):