# Path: reggie/utils/misc.py
# def rstate(rng=None):
#     """
#     Return a RandomState object. This is just a simple wrapper such that if rng
#     is already an instance of RandomState it will be passed through, otherwise
#     it will create a RandomState object using rng as its seed.
#     """
#     if not isinstance(rng, np.random.RandomState):
#         rng = np.random.RandomState(rng)
#     return rng
# 
# def repr_args(obj, *args, **kwargs):
#     """
#     Return a repr string for an object with args and kwargs.
#     """
#     typename = type(obj).__name__
#     args = ['{:s}'.format(str(val)) for val in args]
#     kwargs = ['{:s}={:s}'.format(name, str(val))
#               for name, val in kwargs.items()]
#     return '{:s}({:s})'.format(typename, ', '.join(args + kwargs))
# 
# Path: reggie/core/domains.py
# EPSILON = np.finfo(np.float64).resolution


import numpy as np
from ..utils.misc import rstate, repr_args
from .domains import EPSILON
        """
        Sample from the prior. If `size` is None, return a single sample,
        otherwise return `size`-by-d array of samples.
        """
        raise NotImplementedError

    def get_logprior(self, theta, grad=False):
        """
        Compute the log prior evaluated at the parameter values `theta`. If
        `grad` is True return the gradient of this quantity wrt `theta` as
        well.
        """
        raise NotImplementedError


class Uniform(Prior):
    """
    Uniform prior distribution with bounds a[i] and b[i].
    """
    def __init__(self, a, b):
        a = np.array(a, ndmin=1, dtype=float)
        b = np.array(b, ndmin=1, dtype=float)

        self.bounds = np.c_[a, b]
        self.ndim = len(self.bounds)

        if np.any(self.bounds[:, 1] <= self.bounds[:, 0]):
            raise ValueError("malformed upper/lower bounds")

    def __repr__(self):

# Path: reggie/utils/misc.py
# def rstate(rng=None):
#     """
#     Return a RandomState object. This is just a simple wrapper such that if rng
#     is already an instance of RandomState it will be passed through, otherwise
#     it will create a RandomState object using rng as its seed.
#     """
#     if not isinstance(rng, np.random.RandomState):
#         rng = np.random.RandomState(rng)
#     return rng
# 
# def repr_args(obj, *args, **kwargs):
#     """
#     Return a repr string for an object with args and kwargs.
#     """
#     typename = type(obj).__name__
#     args = ['{:s}'.format(str(val)) for val in args]
#     kwargs = ['{:s}={:s}'.format(name, str(val))
#               for name, val in kwargs.items()]
#     return '{:s}({:s})'.format(typename, ', '.join(args + kwargs))
# 
# Path: reggie/core/domains.py
# EPSILON = np.finfo(np.float64).resolution


# Path: reggie/core/priors.py
import numpy as np
from ..utils.misc import rstate, repr_args
from .domains import EPSILON

        """
        Sample from the prior. If `size` is None, return a single sample,
        otherwise return `size`-by-d array of samples.
        """
        raise NotImplementedError

    def get_logprior(self, theta, grad=False):
        """
        Compute the log prior evaluated at the parameter values `theta`. If
        `grad` is True return the gradient of this quantity wrt `theta` as
        well.
        """
        raise NotImplementedError


class Uniform(Prior):
    """
    Uniform prior distribution with bounds a[i] and b[i].
    """
    def __init__(self, a, b):
        a = np.array(a, ndmin=1, dtype=float)
        b = np.array(b, ndmin=1, dtype=float)

        self.bounds = np.c_[a, b]
        self.ndim = len(self.bounds)

        if np.any(self.bounds[:, 1] <= self.bounds[:, 0]):
            raise ValueError("malformed upper/lower bounds")

    def __repr__(self):

        return repr_args(self,