Пример #1
0
 def random(self, n: int, seed: int = None):
     r = mvt.rvs(cov=self.sigma, df=self._df, size=n, random_state=seed)
     return t.cdf(r, self._df)
Пример #2
0
def test_rvs_raises_errors(df, size, type_):
    with pytest.raises(ValueError):
        mvt.rvs(cov=cov, df=df, size=size, type_=type_)
Пример #3
0
 def random(self, n: int, seed: int = None):
     r = mvt.rvs(cov=self.sigma, df=self._df, size=n, random_state=seed)
     return t.cdf(r, self._df)
Пример #4
0
def test_rvs_generates_correctly(mean, df, size, type_):
    rt = mvt.rvs(mean=mean, cov=cov, df=df, size=size, type_=type_, random_state=8)
    rn = mvn.rvs(cov=cov, size=size)

    assert rt.shape == rn.shape