Untitled

Anonymous
plain_text
02/13/2024 4:44 PM
472 B
15
Indexable
from scipy.stats import loguniform


class loguniform_int:
    """Integer valued version of the log-uniform distribution"""

    def __init__(self, a, b):
        self._distribution = loguniform(a, b)

    def rvs(self, *args, **kwargs):
        """Random variable sample"""
        return self._distribution.rvs(*args, **kwargs).astype(int)
Editor is loading...
Leave a Comment