3
­?d]Â  ã               @   sx   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ eeeedœZdd	d
„Zddd„Zddd„ZdS )é   )ÚRandomState)ÚPhilox)ÚPCG64)ÚSFC64)Ú	Generator)ÚMT19937)r   r   r   r   Úmt19937c             C   s,   | t krt |  }ntt| ƒd ƒ‚t|ƒ ƒS )a  
    Pickling helper function that returns a Generator object

    Parameters
    ----------
    bit_generator_name: str
        String containing the core BitGenerator

    Returns
    -------
    rg: Generator
        Generator using the named core BitGenerator
    z$ is not a known BitGenerator module.)ÚBitGeneratorsÚ
ValueErrorÚstrr   )Úbit_generator_nameÚbit_generator© r   ú5/tmp/pip-build-op5p2y5_/numpy/numpy/random/_pickle.pyÚ__generator_ctor   s    
r   c             C   s(   | t krt |  }ntt| ƒd ƒ‚|ƒ S )a  
    Pickling helper function that returns a bit generator object

    Parameters
    ----------
    bit_generator_name: str
        String containing the name of the BitGenerator

    Returns
    -------
    bit_generator: BitGenerator
        BitGenerator instance
    z$ is not a known BitGenerator module.)r	   r
   r   )r   r   r   r   r   Ú__bit_generator_ctor'   s    
r   c             C   s,   | t krt |  }ntt| ƒd ƒ‚t|ƒ ƒS )a%  
    Pickling helper function that returns a legacy RandomState-like object

    Parameters
    ----------
    bit_generator_name: str
        String containing the core BitGenerator

    Returns
    -------
    rs: RandomState
        Legacy RandomState using the named core BitGenerator
    z$ is not a known BitGenerator module.)r	   r
   r   r   )r   r   r   r   r   Ú__randomstate_ctor>   s    
r   N)r   )r   )r   )Zmtrandr   Zphiloxr   Zpcg64r   Zsfc64r   Ú	generatorr   r   r   r	   r   r   r   r   r   r   r   Ú<module>   s   

