Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/stats/_distr_params.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-12-12 06:31 +0000

1""" 

2Sane parameters for stats.distributions. 

3""" 

4import numpy as np 

5 

6distcont = [ 

7 ['alpha', (3.5704770516650459,)], 

8 ['anglit', ()], 

9 ['arcsine', ()], 

10 ['argus', (1.0,)], 

11 ['beta', (2.3098496451481823, 0.62687954300963677)], 

12 ['betaprime', (5, 6)], 

13 ['bradford', (0.29891359763170633,)], 

14 ['burr', (10.5, 4.3)], 

15 ['burr12', (10, 4)], 

16 ['cauchy', ()], 

17 ['chi', (78,)], 

18 ['chi2', (55,)], 

19 ['cosine', ()], 

20 ['crystalball', (2.0, 3.0)], 

21 ['dgamma', (1.1023326088288166,)], 

22 ['dweibull', (2.0685080649914673,)], 

23 ['erlang', (10,)], 

24 ['expon', ()], 

25 ['exponnorm', (1.5,)], 

26 ['exponpow', (2.697119160358469,)], 

27 ['exponweib', (2.8923945291034436, 1.9505288745913174)], 

28 ['f', (29, 18)], 

29 ['fatiguelife', (29,)], # correction numargs = 1 

30 ['fisk', (3.0857548622253179,)], 

31 ['foldcauchy', (4.7164673455831894,)], 

32 ['foldnorm', (1.9521253373555869,)], 

33 ['gamma', (1.9932305483800778,)], 

34 ['gausshyper', (13.763771604130699, 3.1189636648681431, 

35 2.5145980350183019, 5.1811649903971615)], # veryslow 

36 ['genexpon', (9.1325976465418908, 16.231956600590632, 3.2819552690843983)], 

37 ['genextreme', (-0.1,)], 

38 ['gengamma', (4.4162385429431925, 3.1193091679242761)], 

39 ['gengamma', (4.4162385429431925, -3.1193091679242761)], 

40 ['genhalflogistic', (0.77274727809929322,)], 

41 ['genhyperbolic', (0.5, 1.5, -0.5,)], 

42 ['geninvgauss', (2.3, 1.5)], 

43 ['genlogistic', (0.41192440799679475,)], 

44 ['gennorm', (1.2988442399460265,)], 

45 ['halfgennorm', (0.6748054997000371,)], 

46 ['genpareto', (0.1,)], # use case with finite moments 

47 ['gibrat', ()], 

48 ['gompertz', (0.94743713075105251,)], 

49 ['gumbel_l', ()], 

50 ['gumbel_r', ()], 

51 ['halfcauchy', ()], 

52 ['halflogistic', ()], 

53 ['halfnorm', ()], 

54 ['hypsecant', ()], 

55 ['invgamma', (4.0668996136993067,)], 

56 ['invgauss', (0.14546264555347513,)], 

57 ['invweibull', (10.58,)], 

58 ['johnsonsb', (4.3172675099141058, 3.1837781130785063)], 

59 ['johnsonsu', (2.554395574161155, 2.2482281679651965)], 

60 ['kappa4', (0.0, 0.0)], 

61 ['kappa4', (-0.1, 0.1)], 

62 ['kappa4', (0.0, 0.1)], 

63 ['kappa4', (0.1, 0.0)], 

64 ['kappa3', (1.0,)], 

65 ['ksone', (1000,)], # replace 22 by 100 to avoid failing range, ticket 956 

66 ['kstwo', (10,)], 

67 ['kstwobign', ()], 

68 ['laplace', ()], 

69 ['laplace_asymmetric', (2,)], 

70 ['levy', ()], 

71 ['levy_l', ()], 

72 ['levy_stable', (1.8, -0.5)], 

73 ['loggamma', (0.41411931826052117,)], 

74 ['logistic', ()], 

75 ['loglaplace', (3.2505926592051435,)], 

76 ['lognorm', (0.95368226960575331,)], 

77 ['loguniform', (0.01, 1.25)], 

78 ['lomax', (1.8771398388773268,)], 

79 ['maxwell', ()], 

80 ['mielke', (10.4, 4.6)], 

81 ['moyal', ()], 

82 ['nakagami', (4.9673794866666237,)], 

83 ['ncf', (27, 27, 0.41578441799226107)], 

84 ['nct', (14, 0.24045031331198066)], 

85 ['ncx2', (21, 1.0560465975116415)], 

86 ['norm', ()], 

87 ['norminvgauss', (1.25, 0.5)], 

88 ['pareto', (2.621716532144454,)], 

89 ['pearson3', (0.1,)], 

90 ['pearson3', (-2,)], 

91 ['powerlaw', (1.6591133289905851,)], 

92 ['powerlaw', (0.6591133289905851,)], 

93 ['powerlognorm', (2.1413923530064087, 0.44639540782048337)], 

94 ['powernorm', (4.4453652254590779,)], 

95 ['rayleigh', ()], 

96 ['rdist', (1.6,)], 

97 ['recipinvgauss', (0.63004267809369119,)], 

98 ['reciprocal', (0.01, 1.25)], 

99 ['rice', (0.7749725210111873,)], 

100 ['semicircular', ()], 

101 ['skewcauchy', (0.5,)], 

102 ['skewnorm', (4.0,)], 

103 ['studentized_range', (3.0, 10.0)], 

104 ['t', (2.7433514990818093,)], 

105 ['trapezoid', (0.2, 0.8)], 

106 ['triang', (0.15785029824528218,)], 

107 ['truncexpon', (4.6907725456810478,)], 

108 ['truncnorm', (-1.0978730080013919, 2.7306754109031979)], 

109 ['truncnorm', (0.1, 2.)], 

110 ['truncpareto', (1.8, 5.3)], 

111 ['truncweibull_min', (2.5, 0.25, 1.75)], 

112 ['tukeylambda', (3.1321477856738267,)], 

113 ['uniform', ()], 

114 ['vonmises', (3.9939042581071398,)], 

115 ['vonmises_line', (3.9939042581071398,)], 

116 ['wald', ()], 

117 ['weibull_max', (2.8687961709100187,)], 

118 ['weibull_min', (1.7866166930421596,)], 

119 ['wrapcauchy', (0.031071279018614728,)]] 

120 

121 

122distdiscrete = [ 

123 ['bernoulli',(0.3,)], 

124 ['betabinom', (5, 2.3, 0.63)], 

125 ['binom', (5, 0.4)], 

126 ['boltzmann',(1.4, 19)], 

127 ['dlaplace', (0.8,)], # 0.5 

128 ['geom', (0.5,)], 

129 ['hypergeom',(30, 12, 6)], 

130 ['hypergeom',(21,3,12)], # numpy.random (3,18,12) numpy ticket:921 

131 ['hypergeom',(21,18,11)], # numpy.random (18,3,11) numpy ticket:921 

132 ['nchypergeom_fisher', (140, 80, 60, 0.5)], 

133 ['nchypergeom_wallenius', (140, 80, 60, 0.5)], 

134 ['logser', (0.6,)], # re-enabled, numpy ticket:921 

135 ['nbinom', (0.4, 0.4)], # from tickets: 583 

136 ['nbinom', (5, 0.5)], 

137 ['planck', (0.51,)], # 4.1 

138 ['poisson', (0.6,)], 

139 ['randint', (7, 31)], 

140 ['skellam', (15, 8)], 

141 ['zipf', (6.5,)], 

142 ['zipfian', (0.75, 15)], 

143 ['zipfian', (1.25, 10)], 

144 ['yulesimon', (11.0,)], 

145 ['nhypergeom', (20, 7, 1)] 

146] 

147 

148 

149invdistdiscrete = [ 

150 # In each of the following, at least one shape parameter is invalid 

151 ['hypergeom', (3, 3, 4)], 

152 ['nhypergeom', (5, 2, 8)], 

153 ['nchypergeom_fisher', (3, 3, 4, 1)], 

154 ['nchypergeom_wallenius', (3, 3, 4, 1)], 

155 ['bernoulli', (1.5, )], 

156 ['binom', (10, 1.5)], 

157 ['betabinom', (10, -0.4, -0.5)], 

158 ['boltzmann', (-1, 4)], 

159 ['dlaplace', (-0.5, )], 

160 ['geom', (1.5, )], 

161 ['logser', (1.5, )], 

162 ['nbinom', (10, 1.5)], 

163 ['planck', (-0.5, )], 

164 ['poisson', (-0.5, )], 

165 ['randint', (5, 2)], 

166 ['skellam', (-5, -2)], 

167 ['zipf', (-2, )], 

168 ['yulesimon', (-2, )], 

169 ['zipfian', (-0.75, 15)] 

170] 

171 

172 

173invdistcont = [ 

174 # In each of the following, at least one shape parameter is invalid 

175 ['alpha', (-1, )], 

176 ['anglit', ()], 

177 ['arcsine', ()], 

178 ['argus', (-1, )], 

179 ['beta', (-2, 2)], 

180 ['betaprime', (-2, 2)], 

181 ['bradford', (-1, )], 

182 ['burr', (-1, 1)], 

183 ['burr12', (-1, 1)], 

184 ['cauchy', ()], 

185 ['chi', (-1, )], 

186 ['chi2', (-1, )], 

187 ['cosine', ()], 

188 ['crystalball', (-1, 2)], 

189 ['dgamma', (-1, )], 

190 ['dweibull', (-1, )], 

191 ['erlang', (-1, )], 

192 ['expon', ()], 

193 ['exponnorm', (-1, )], 

194 ['exponweib', (1, -1)], 

195 ['exponpow', (-1, )], 

196 ['f', (10, -10)], 

197 ['fatiguelife', (-1, )], 

198 ['fisk', (-1, )], 

199 ['foldcauchy', (-1, )], 

200 ['foldnorm', (-1, )], 

201 ['genlogistic', (-1, )], 

202 ['gennorm', (-1, )], 

203 ['genpareto', (np.inf, )], 

204 ['genexpon', (1, 2, -3)], 

205 ['genextreme', (np.inf, )], 

206 ['genhyperbolic', (0.5, -0.5, -1.5,)], 

207 ['gausshyper', (1, 2, 3, -4)], 

208 ['gamma', (-1, )], 

209 ['gengamma', (-1, 0)], 

210 ['genhalflogistic', (-1, )], 

211 ['geninvgauss', (1, 0)], 

212 ['gibrat', ()], 

213 ['gompertz', (-1, )], 

214 ['gumbel_r', ()], 

215 ['gumbel_l', ()], 

216 ['halfcauchy', ()], 

217 ['halflogistic', ()], 

218 ['halfnorm', ()], 

219 ['halfgennorm', (-1, )], 

220 ['hypsecant', ()], 

221 ['invgamma', (-1, )], 

222 ['invgauss', (-1, )], 

223 ['invweibull', (-1, )], 

224 ['johnsonsb', (1, -2)], 

225 ['johnsonsu', (1, -2)], 

226 ['kappa4', (np.nan, 0)], 

227 ['kappa3', (-1, )], 

228 ['ksone', (-1, )], 

229 ['kstwo', (-1, )], 

230 ['kstwobign', ()], 

231 ['laplace', ()], 

232 ['laplace_asymmetric', (-1, )], 

233 ['levy', ()], 

234 ['levy_l', ()], 

235 ['levy_stable', (-1, 1)], 

236 ['logistic', ()], 

237 ['loggamma', (-1, )], 

238 ['loglaplace', (-1, )], 

239 ['lognorm', (-1, )], 

240 ['loguniform', (10, 5)], 

241 ['lomax', (-1, )], 

242 ['maxwell', ()], 

243 ['mielke', (1, -2)], 

244 ['moyal', ()], 

245 ['nakagami', (-1, )], 

246 ['ncx2', (-1, 2)], 

247 ['ncf', (10, 20, -1)], 

248 ['nct', (-1, 2)], 

249 ['norm', ()], 

250 ['norminvgauss', (5, -10)], 

251 ['pareto', (-1, )], 

252 ['pearson3', (np.nan, )], 

253 ['powerlaw', (-1, )], 

254 ['powerlognorm', (1, -2)], 

255 ['powernorm', (-1, )], 

256 ['rdist', (-1, )], 

257 ['rayleigh', ()], 

258 ['rice', (-1, )], 

259 ['recipinvgauss', (-1, )], 

260 ['semicircular', ()], 

261 ['skewnorm', (np.inf, )], 

262 ['studentized_range', (-1, 1)], 

263 ['t', (-1, )], 

264 ['trapezoid', (0, 2)], 

265 ['triang', (2, )], 

266 ['truncexpon', (-1, )], 

267 ['truncnorm', (10, 5)], 

268 ['truncpareto', (-1, 5)], 

269 ['truncpareto', (1.8, .5)], 

270 ['truncweibull_min', (-2.5, 0.25, 1.75)], 

271 ['tukeylambda', (np.nan, )], 

272 ['uniform', ()], 

273 ['vonmises', (-1, )], 

274 ['vonmises_line', (-1, )], 

275 ['wald', ()], 

276 ['weibull_min', (-1, )], 

277 ['weibull_max', (-1, )], 

278 ['wrapcauchy', (2, )], 

279 ['reciprocal', (15, 10)], 

280 ['skewcauchy', (2, )] 

281]