# Path: dppy/utils.py
# def check_random_state(seed: object) -> np.random.RandomState:
#     """Turn seed into a np.random.RandomState instance
#     Parameters
#     ----------
#     seed : None | int | instance of RandomState
#         If seed is None, return the RandomState singleton used by np.random.
#         If seed is an int, return a new RandomState instance seeded with seed.
#         If seed is already a RandomState instance, return it.
#         Otherwise raise ValueError.
# 
#     Returns
#     -------
#     np.random.RandomState
# 
#     .. seealso::
# 
#         `Scikit learn source code <https://github.com/scikit-learn/scikit-learn/blob/7813f7efb/sklearn/utils/validation.py#L763>`_
#     """
#     if seed is None or seed is np.random:
#         return np.random.mtrand._rand
#     if isinstance(seed, (int, np.integer)):
#         return np.random.RandomState(seed)
#     if isinstance(seed, np.random.RandomState):
#         return seed
#     raise ValueError('%r cannot be used to seed a numpy.random.RandomState'
#                      ' instance' % seed)


from abc import ABCMeta, abstractmethod
from scipy import stats
from re import findall  # to convert class names to string
from dppy.utils import check_random_state
import numpy as np
import matplotlib.pyplot as plt
import dppy.random_matrices as rm
        Available for :py:attr:`beta` :math:`>0` and the degenerate case :py:attr:`beta` :math:`=0` corresponding to i.i.d. points from the Gaussian :math:`\\mathcal{N}(\\mu,\\sigma^2)` reference measure

        :param loc:
            Mean :math:`\\mu` of the Gaussian :math:`\\mathcal{N}(\\mu, \\sigma^2)`
        :type loc:
            float, default :math:`0`

        :param scale:
            Standard deviation :math:`\\sigma` of the Gaussian :math:`\\mathcal{N}(\\mu, \\sigma^2)`
        :type scale:
            float, default :math:`\\sqrt{2}`

        :param size_N:
            Number :math:`N` of points, i.e., size of the matrix to be diagonalized
        :type size_N:
            int, default :math:`10`

        .. note::

            The reference measure associated with the :ref:`full matrix model <hermite_full_matrix_model>` is :math:`\\mathcal{N}(0,2)`.
            For this reason, in the :py:attr:`sampling_params` attribute, the default values are set to ``loc``:math:`=0` and ``scale``:math:`=\\sqrt{2}`.

            To compare :py:meth:`sample_banded_model` with :py:meth:`sample_full_model` simply use the ``size_N`` parameter.

        .. seealso::

            - :ref:`Tridiagonal matrix model <hermite_banded_matrix_model>` associated to the Hermite ensemble
            - :cite:`DuEd02` II-C
            - :py:meth:`sample_full_model`
        """

# Path: dppy/utils.py
# def check_random_state(seed: object) -> np.random.RandomState:
#     """Turn seed into a np.random.RandomState instance
#     Parameters
#     ----------
#     seed : None | int | instance of RandomState
#         If seed is None, return the RandomState singleton used by np.random.
#         If seed is an int, return a new RandomState instance seeded with seed.
#         If seed is already a RandomState instance, return it.
#         Otherwise raise ValueError.
# 
#     Returns
#     -------
#     np.random.RandomState
# 
#     .. seealso::
# 
#         `Scikit learn source code <https://github.com/scikit-learn/scikit-learn/blob/7813f7efb/sklearn/utils/validation.py#L763>`_
#     """
#     if seed is None or seed is np.random:
#         return np.random.mtrand._rand
#     if isinstance(seed, (int, np.integer)):
#         return np.random.RandomState(seed)
#     if isinstance(seed, np.random.RandomState):
#         return seed
#     raise ValueError('%r cannot be used to seed a numpy.random.RandomState'
#                      ' instance' % seed)


# Path: dppy/beta_ensembles.py
from abc import ABCMeta, abstractmethod
from scipy import stats
from re import findall  # to convert class names to string
from dppy.utils import check_random_state
import numpy as np
import matplotlib.pyplot as plt
import dppy.random_matrices as rm

        Available for :py:attr:`beta` :math:`>0` and the degenerate case :py:attr:`beta` :math:`=0` corresponding to i.i.d. points from the Gaussian :math:`\\mathcal{N}(\\mu,\\sigma^2)` reference measure

        :param loc:
            Mean :math:`\\mu` of the Gaussian :math:`\\mathcal{N}(\\mu, \\sigma^2)`
        :type loc:
            float, default :math:`0`

        :param scale:
            Standard deviation :math:`\\sigma` of the Gaussian :math:`\\mathcal{N}(\\mu, \\sigma^2)`
        :type scale:
            float, default :math:`\\sqrt{2}`

        :param size_N:
            Number :math:`N` of points, i.e., size of the matrix to be diagonalized
        :type size_N:
            int, default :math:`10`

        .. note::

            The reference measure associated with the :ref:`full matrix model <hermite_full_matrix_model>` is :math:`\\mathcal{N}(0,2)`.
            For this reason, in the :py:attr:`sampling_params` attribute, the default values are set to ``loc``:math:`=0` and ``scale``:math:`=\\sqrt{2}`.

            To compare :py:meth:`sample_banded_model` with :py:meth:`sample_full_model` simply use the ``size_N`` parameter.

        .. seealso::

            - :ref:`Tridiagonal matrix model <hermite_banded_matrix_model>` associated to the Hermite ensemble
            - :cite:`DuEd02` II-C
            - :py:meth:`sample_full_model`
        """

        rng = check_random_state(random_state)