Example #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}")
Example #2
0
 def time_pinv_setup(self, dist):
     with np.testing.suppress_warnings() as sup:
         sup.filter(RuntimeWarning)
         stats.NumericalInversePolynomial(
             dist, random_state=self.urng
         )