@@ -120,94 +120,124 @@ def check_shape(rv, size=None, expected=None):
120120class ScalarParameterShape (unittest .TestCase ):
121121
122122 def check (self , dist , ** kwargs ):
123+ nr .seed (20090425 )
123124 test_cases = [(None , (1 ,)), (5 , (5 ,)), ((4 , 5 ), (4 , 5 ))]
124125 check_dist ((dist , kwargs ), test_cases )
125126
126127 def test_normal (self ):
128+ nr .seed (20090425 )
127129 self .check (Normal , mu = 0. , tau = 1. )
128130
129131 def test_uniform (self ):
132+ nr .seed (20090425 )
130133 self .check (Uniform , lower = 0. , upper = 1. )
131134
132135 def test_half_normal (self ):
136+ nr .seed (20090425 )
133137 self .check (HalfNormal , tau = 1. )
134138
135139 def test_wald (self ):
140+ nr .seed (20090425 )
136141 self .check (Wald , mu = 1. , lam = 1. , alpha = 0. )
137142
138143 def test_beta (self ):
144+ nr .seed (20090425 )
139145 self .check (Beta , alpha = 1. , beta = 1. )
140146
141147 def test_exponential (self ):
148+ nr .seed (20090425 )
142149 self .check (Exponential , lam = 1. )
143150
144151 def test_laplace (self ):
152+ nr .seed (20090425 )
145153 self .check (Laplace , mu = 1. , b = 1 )
146154
147155 def test_lognormal (self ):
156+ nr .seed (20090425 )
148157 self .check (Lognormal , mu = 1. , tau = 1. )
149158
150159 def test_student_t (self ):
160+ nr .seed (20090425 )
151161 self .check (StudentT , nu = 5 , mu = 0. , lam = 1. )
152162
153163 def test_pareto (self ):
164+ nr .seed (20090425 )
154165 self .check (Pareto , alpha = 0.5 , m = 1. )
155166
156167 def test_cauchy (self ):
168+ nr .seed (20090425 )
157169 self .check (Cauchy , alpha = 1. , beta = 1. )
158170
159171 def test_half_cauchy (self ):
172+ nr .seed (20090425 )
160173 self .check (HalfCauchy , beta = 1. )
161174
162175 def test_gamma (self ):
176+ nr .seed (20090425 )
163177 self .check (Gamma , alpha = 1. , beta = 1. )
164178
165179 def test_inverse_gamma (self ):
180+ nr .seed (20090425 )
166181 self .check (InverseGamma , alpha = 0.5 , beta = 0.5 )
167182
168183 def test_chi_squared (self ):
184+ nr .seed (20090425 )
169185 self .check (ChiSquared , nu = 2 )
170186
171187 def test_weibull (self ):
188+ nr .seed (20090425 )
172189 self .check (Weibull , alpha = 1. , beta = 1. )
173190
174191 def test_ex_gaussian (self ):
192+ nr .seed (20090425 )
175193 self .check (ExGaussian , mu = 0. , sigma = 1. , nu = 1. )
176194
177195 def test_vonmises (self ):
196+ nr .seed (20090425 )
178197 self .check (VonMises , mu = 0. , kappa = 1. )
179198
180199 def test_binomial (self ):
200+ nr .seed (20090425 )
181201 self .check (Binomial , n = 5 , p = 0.5 )
182202
183203 def test_beta_binomial (self ):
204+ nr .seed (20090425 )
184205 self .check (BetaBinomial , alpha = 1. , beta = 1. , n = 1 )
185206
186207 def test_bernoulli (self ):
208+ nr .seed (20090425 )
187209 self .check (Bernoulli , p = 0.5 )
188210
189211 def test_poisson (self ):
212+ nr .seed (20090425 )
190213 self .check (Poisson , mu = 1. )
191214
192215 def test_negative_binomial (self ):
216+ nr .seed (20090425 )
193217 self .check (NegativeBinomial , mu = 1. , alpha = 1. )
194218
195219 def test_constant_dist (self ):
220+ nr .seed (20090425 )
196221 self .check (ConstantDist , c = 3 )
197222
198223 def test_zero_inflated_poisson (self ):
224+ nr .seed (20090425 )
199225 self .check (ZeroInflatedPoisson , theta = 1 , psi = 0.3 )
200226
201227 def test_zero_inflated_negative_binomial (self ):
228+ nr .seed (20090425 )
202229 self .check (ZeroInflatedNegativeBinomial , mu = 1. , alpha = 1. , psi = 0.3 )
203230
204231 def test_discrete_uniform (self ):
232+ nr .seed (20090425 )
205233 self .check (DiscreteUniform , lower = 0. , upper = 10 )
206234
207235 def test_geometric (self ):
236+ nr .seed (20090425 )
208237 self .check (Geometric , p = 0.5 )
209238
210239 def test_categorical (self ):
240+ nr .seed (20090425 )
211241 self .check (Categorical , p = np .array ([0.2 , 0.3 , 0.5 ]))
212242
213243
0 commit comments