@@ -240,12 +240,6 @@ class TestGaussianRandomWalk(BaseTestCases.BaseTestCase):
240
240
default_shape = (1 ,)
241
241
242
242
243
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
244
- class TestNormal (BaseTestCases .BaseTestCase ):
245
- distribution = pm .Normal
246
- params = {"mu" : 0.0 , "tau" : 1.0 }
247
-
248
-
249
243
@pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
250
244
class TestTruncatedNormal (BaseTestCases .BaseTestCase ):
251
245
distribution = pm .TruncatedNormal
@@ -270,18 +264,6 @@ class TestSkewNormal(BaseTestCases.BaseTestCase):
270
264
params = {"mu" : 0.0 , "sigma" : 1.0 , "alpha" : 5.0 }
271
265
272
266
273
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
274
- class TestHalfNormal (BaseTestCases .BaseTestCase ):
275
- distribution = pm .HalfNormal
276
- params = {"tau" : 1.0 }
277
-
278
-
279
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
280
- class TestUniform (BaseTestCases .BaseTestCase ):
281
- distribution = pm .Uniform
282
- params = {"lower" : 0.0 , "upper" : 1.0 }
283
-
284
-
285
267
@pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
286
268
class TestTriangular (BaseTestCases .BaseTestCase ):
287
269
distribution = pm .Triangular
@@ -305,12 +287,6 @@ class TestKumaraswamy(BaseTestCases.BaseTestCase):
305
287
params = {"a" : 1.0 , "b" : 1.0 }
306
288
307
289
308
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
309
- class TestExponential (BaseTestCases .BaseTestCase ):
310
- distribution = pm .Exponential
311
- params = {"lam" : 1.0 }
312
-
313
-
314
290
@pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
315
291
class TestLaplace (BaseTestCases .BaseTestCase ):
316
292
distribution = pm .Laplace
@@ -335,30 +311,6 @@ class TestStudentT(BaseTestCases.BaseTestCase):
335
311
params = {"nu" : 5.0 , "mu" : 0.0 , "lam" : 1.0 }
336
312
337
313
338
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
339
- class TestCauchy (BaseTestCases .BaseTestCase ):
340
- distribution = pm .Cauchy
341
- params = {"alpha" : 1.0 , "beta" : 1.0 }
342
-
343
-
344
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
345
- class TestHalfCauchy (BaseTestCases .BaseTestCase ):
346
- distribution = pm .HalfCauchy
347
- params = {"beta" : 1.0 }
348
-
349
-
350
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
351
- class TestGamma (BaseTestCases .BaseTestCase ):
352
- distribution = pm .Gamma
353
- params = {"alpha" : 1.0 , "beta" : 1.0 }
354
-
355
-
356
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
357
- class TestInverseGamma (BaseTestCases .BaseTestCase ):
358
- distribution = pm .InverseGamma
359
- params = {"alpha" : 0.5 , "beta" : 0.5 }
360
-
361
-
362
314
@pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
363
315
class TestChiSquared (BaseTestCases .BaseTestCase ):
364
316
distribution = pm .ChiSquared
@@ -401,12 +353,6 @@ class TestLogitNormal(BaseTestCases.BaseTestCase):
401
353
params = {"mu" : 0.0 , "sigma" : 1.0 }
402
354
403
355
404
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
405
- class TestBinomial (BaseTestCases .BaseTestCase ):
406
- distribution = pm .Binomial
407
- params = {"n" : 5 , "p" : 0.5 }
408
-
409
-
410
356
@pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
411
357
class TestBetaBinomial (BaseTestCases .BaseTestCase ):
412
358
distribution = pm .BetaBinomial
@@ -419,23 +365,12 @@ class TestBernoulli(BaseTestCases.BaseTestCase):
419
365
params = {"p" : 0.5 }
420
366
421
367
368
+ @pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
422
369
class TestDiscreteWeibull (BaseTestCases .BaseTestCase ):
423
370
distribution = pm .DiscreteWeibull
424
371
params = {"q" : 0.25 , "beta" : 2.0 }
425
372
426
373
427
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
428
- class TestPoisson (BaseTestCases .BaseTestCase ):
429
- distribution = pm .Poisson
430
- params = {"mu" : 1.0 }
431
-
432
-
433
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
434
- class TestNegativeBinomial (BaseTestCases .BaseTestCase ):
435
- distribution = pm .NegativeBinomial
436
- params = {"mu" : 1.0 , "alpha" : 1.0 }
437
-
438
-
439
374
@pytest .mark .xfail (reason = "This distribution has not been refactored for v4" )
440
375
class TestConstant (BaseTestCases .BaseTestCase ):
441
376
distribution = pm .Constant
@@ -484,45 +419,6 @@ class TestMoyal(BaseTestCases.BaseTestCase):
484
419
params = {"mu" : 0.0 , "sigma" : 1.0 }
485
420
486
421
487
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
488
- class TestCategorical (BaseTestCases .BaseTestCase ):
489
- distribution = pm .Categorical
490
- params = {"p" : np .ones (BaseTestCases .BaseTestCase .shape )}
491
-
492
- def get_random_variable (
493
- self , shape , with_vector_params = False , ** kwargs
494
- ): # don't transform categories
495
- return super ().get_random_variable (shape , with_vector_params = False , ** kwargs )
496
-
497
- def test_probability_vector_shape (self ):
498
- """Check that if a 2d array of probabilities are passed to categorical correct shape is returned"""
499
- p = np .ones ((10 , 5 ))
500
- assert pm .Categorical .dist (p = p ).random ().shape == (10 ,)
501
- assert pm .Categorical .dist (p = p ).random (size = 4 ).shape == (4 , 10 )
502
- p = np .ones ((3 , 7 , 5 ))
503
- assert pm .Categorical .dist (p = p ).random ().shape == (3 , 7 )
504
- assert pm .Categorical .dist (p = p ).random (size = 4 ).shape == (4 , 3 , 7 )
505
-
506
-
507
- @pytest .mark .skip (reason = "This test is covered by Aesara" )
508
- class TestDirichlet (SeededTest ):
509
- @pytest .mark .parametrize (
510
- "shape, size" ,
511
- [
512
- ((2 ), (1 )),
513
- ((2 ), (2 )),
514
- ((2 , 2 ), (2 , 100 )),
515
- ((3 , 4 ), (3 , 4 )),
516
- ((3 , 4 ), (3 , 4 , 100 )),
517
- ((3 , 4 ), (100 )),
518
- ((3 , 4 ), (1 )),
519
- ],
520
- )
521
- def test_dirichlet_random_shape (self , shape , size ):
522
- out_shape = to_tuple (size ) + to_tuple (shape )
523
- assert pm .Dirichlet .dist (a = np .ones (shape )).random (size = size ).shape == out_shape
524
-
525
-
526
422
class TestCorrectParametrizationMappingPymcToScipy (SeededTest ):
527
423
@staticmethod
528
424
def get_inputs_from_apply_node_outputs (outputs ):
0 commit comments