diff --git a/scipy/stats/tests/test_distributions.py b/scipy/stats/tests/test_distributions.py index 98eec0892b8a..f58123aab047 100755 --- a/scipy/stats/tests/test_distributions.py +++ b/scipy/stats/tests/test_distributions.py @@ -1385,7 +1385,8 @@ def test_logpdf_extreme_values(self): # with 64 bit floating point. assert_equal(logp, [-800, -800]) - @pytest.mark.parametrize("loc_rvs,scale_rvs", [np.random.rand(2)]) + @pytest.mark.parametrize("loc_rvs,scale_rvs", [(0.4484955, 0.10216821), + (0.62918191, 0.74367064)]) def test_fit(self, loc_rvs, scale_rvs): data = stats.logistic.rvs(size=100, loc=loc_rvs, scale=scale_rvs) @@ -2183,7 +2184,7 @@ def setup_method(self): np.random.seed(1234) @pytest.mark.parametrize("rvs_mu,rvs_loc,rvs_scale", - [(2, 0, 1), (np.random.rand(3)*10)]) + [(2, 0, 1), (4.635, 4.362, 6.303)]) def test_fit(self, rvs_mu, rvs_loc, rvs_scale): data = stats.invgauss.rvs(size=100, mu=rvs_mu, loc=rvs_loc, scale=rvs_scale) @@ -2214,7 +2215,7 @@ def test_fit(self, rvs_mu, rvs_loc, rvs_scale): assert shape_mle1 == shape_mle2 == shape_mle3 == 1.04 @pytest.mark.parametrize("rvs_mu,rvs_loc,rvs_scale", - [(2, 0, 1), (np.random.rand(3)*10)]) + [(2, 0, 1), (6.311, 3.225, 4.520)]) def test_fit_MLE_comp_optimizer(self, rvs_mu, rvs_loc, rvs_scale): data = stats.invgauss.rvs(size=100, mu=rvs_mu, loc=rvs_loc, scale=rvs_scale) @@ -5120,7 +5121,8 @@ def test_logsf(self): y = stats.rayleigh.logsf(50) assert_allclose(y, -1250) - @pytest.mark.parametrize("rvs_loc,rvs_scale", [np.random.rand(2)]) + @pytest.mark.parametrize("rvs_loc,rvs_scale", [(0.85373171, 0.86932204), + (0.20558821, 0.61621008)]) def test_fit(self, rvs_loc, rvs_scale): data = stats.rayleigh.rvs(size=250, loc=rvs_loc, scale=rvs_scale) @@ -5145,7 +5147,7 @@ def scale_mle(data, floc): assert_equal(scale, scale_mle(data, loc)) @pytest.mark.parametrize("rvs_loc,rvs_scale", [[0.74, 0.01], - np.random.rand(2)]) + [0.08464463, 0.12069025]]) def test_fit_comparison_super_method(self, rvs_loc, rvs_scale): # test that the objective function result of the analytical MLEs is # less than or equal to that of the numerically optimized estimate