File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,3 +367,33 @@ def test_fit(self):
367367 )
368368
369369
370+ class Test_rice (CheckDist_Mixin ):
371+ def setup (self ):
372+ self .dist = dist .rice
373+ self .cargs = []
374+ self .ckwds = dict (R = 10 , sigma = 2 )
375+
376+ self .np_rand_fxn = stats .rice .rvs
377+ self .npargs = [5 ]
378+ self .npkwds = dict (loc = 0 , scale = 2 )
379+
380+ def test_processargs (self ):
381+ nt .assert_dict_equal (
382+ self .dist ._process_args (R = 10 , sigma = 2 ),
383+ dict (b = 5 , loc = 0 , scale = 2 )
384+ )
385+
386+ nt .assert_dict_equal (
387+ self .dist ._process_args (R = 10 , sigma = 2 , fit = True ),
388+ dict (b = 5 , floc = 0 , fscale = 2 )
389+ )
390+
391+ @seed
392+ def test_fit (self ):
393+ data = stats .rice (5 , loc = 0 , scale = 2 ).rvs (size = 37 )
394+ params = self .dist .fit (data )
395+ check_params (
396+ (params .R , 10.100674084593422 ),
397+ (params .sigma , 1.759817171541185 ),
398+ (params .loc , 0 ),
399+ )
You can’t perform that action at this time.
0 commit comments