@@ -2134,14 +2134,6 @@ def test_dirichlet_vectorized(self, a, size):
21342134 err_msg = f"vals={ vals } " ,
21352135 )
21362136
2137- def test_dirichlet_shape (self ):
2138- a = at .as_tensor_variable (np .r_ [1 , 2 ])
2139- dir_rv = Dirichlet .dist (a )
2140- assert dir_rv .shape .eval () == (2 ,)
2141-
2142- with pytest .warns (DeprecationWarning ), aesara .change_flags (compute_test_value = "ignore" ):
2143- dir_rv = Dirichlet .dist (at .vector ())
2144-
21452137 @pytest .mark .parametrize ("n" , [2 , 3 ])
21462138 def test_multinomial (self , n ):
21472139 self .check_logp (
@@ -2151,33 +2143,6 @@ def test_multinomial(self, n):
21512143 lambda value , n , p : scipy .stats .multinomial .logpmf (value , n , p ),
21522144 )
21532145
2154- @pytest .mark .parametrize (
2155- "p, size, n" ,
2156- [
2157- [[0.25 , 0.25 , 0.25 , 0.25 ], (4 ,), 2 ],
2158- [[0.25 , 0.25 , 0.25 , 0.25 ], (1 , 4 ), 3 ],
2159- # 3: expect to fail
2160- # [[.25, .25, .25, .25], (10, 4)],
2161- [[0.25 , 0.25 , 0.25 , 0.25 ], (10 , 1 , 4 ), 5 ],
2162- # 5: expect to fail
2163- # [[[.25, .25, .25, .25]], (2, 4), [7, 11]],
2164- [[[0.25 , 0.25 , 0.25 , 0.25 ], [0.25 , 0.25 , 0.25 , 0.25 ]], (2 , 4 ), 13 ],
2165- [[[0.25 , 0.25 , 0.25 , 0.25 ], [0.25 , 0.25 , 0.25 , 0.25 ]], (1 , 2 , 4 ), [23 , 29 ]],
2166- [
2167- [[0.25 , 0.25 , 0.25 , 0.25 ], [0.25 , 0.25 , 0.25 , 0.25 ]],
2168- (10 , 2 , 4 ),
2169- [31 , 37 ],
2170- ],
2171- [[[0.25 , 0.25 , 0.25 , 0.25 ], [0.25 , 0.25 , 0.25 , 0.25 ]], (2 , 4 ), [17 , 19 ]],
2172- ],
2173- )
2174- def test_multinomial_random (self , p , size , n ):
2175- p = np .asarray (p )
2176- with Model () as model :
2177- m = Multinomial ("m" , n = n , p = p , size = size )
2178-
2179- assert m .eval ().shape == size + p .shape
2180-
21812146 @pytest .mark .parametrize ("n" , [(10 ), ([10 , 11 ]), ([[5 , 6 ], [10 , 11 ]])])
21822147 @pytest .mark .parametrize (
21832148 "p" ,
0 commit comments