# 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


import numpy as np
from ..utils.misc import rstate
"""
Perform parameter sampling.
"""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function



__all__ = ['sample']


def slice_sample(model, sigma=1.0, max_steps=1000, rng=None):
    """
    Implementation of a generic slice sampling step which takes a model
    instance and returns a new model instance.
    """

# 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


# Path: reggie/learning/sampling.py
import numpy as np
from ..utils.misc import rstate

"""
Perform parameter sampling.
"""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function



__all__ = ['sample']


def slice_sample(model, sigma=1.0, max_steps=1000, rng=None):
    """
    Implementation of a generic slice sampling step which takes a model
    instance and returns a new model instance.
    """

    rng = rstate(rng)