U
    ?h	                     @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ d dl	m
Z
 d dlmZ eeeeedZdd	d
ZdefddZdefddZdS )   RandomState)Philox)PCG64	PCG64DXSM)SFC64	Generator)MT19937)r
   r   r   r   r   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.)BitGenerators
ValueErrorstr)bit_generator_nameZbit_generator r   F/var/www/html/venv/lib/python3.8/site-packages/numpy/random/_pickle.py__bit_generator_ctor   s    
r   c                 C   s   t || S )a  
    Pickling helper function that returns a Generator object

    Parameters
    ----------
    bit_generator_name : str
        String containing the core BitGenerator's name
    bit_generator_ctor : callable, optional
        Callable function that takes bit_generator_name as its only argument
        and returns an instantized bit generator.

    Returns
    -------
    rg : Generator
        Generator using the named core BitGenerator
    r   r   Zbit_generator_ctorr   r   r   __generator_ctor(   s    r   c                 C   s   t || S )a  
    Pickling helper function that returns a legacy RandomState-like object

    Parameters
    ----------
    bit_generator_name : str
        String containing the core BitGenerator's name
    bit_generator_ctor : callable, optional
        Callable function that takes bit_generator_name as its only argument
        and returns an instantized bit generator.

    Returns
    -------
    rs : RandomState
        Legacy RandomState using the named core BitGenerator
    r   r   r   r   r   __randomstate_ctor=   s    r   N)r
   )Zmtrandr   Z_philoxr   Z_pcg64r   r   Z_sfc64r   Z
_generatorr	   Z_mt19937r
   r   r   r   r   r   r   r   r   <module>   s$   

