コード例 #1
0
 def setup(self, dist):
     self.urng = np.random.default_rng(0xb235b58c1f616c59c18d8568f77d44d1)
     with np.testing.suppress_warnings() as sup:
         sup.filter(RuntimeWarning)
         try:
             self.rng = stats.NumericalInversePolynomial(
                 dist, random_state=self.urng)
         except stats.UNURANError:
             raise NotImplementedError(f"setup failed for {dist}")
コード例 #2
0
ファイル: stats_sampling.py プロジェクト: dimpase/scipy
 def time_pinv_setup(self, dist):
     with np.testing.suppress_warnings() as sup:
         sup.filter(RuntimeWarning)
         stats.NumericalInversePolynomial(
             dist, random_state=self.urng
         )