U
    3d0                     @   s0   d Z ddlZddlmZmZ dd Zdd ZdS )z Test fast_dict.
    N)IntFloatDictargminc                  C   s   t jd} t | jdddt j}| t|}t	||}t
||D ]\}}|| |ksJtqJt|t|ksxt|dd |d dkstt|t|d ksttdD ]}||d	 d
 q|d d
kstd S )Nr   d   
   )sizex   g      @   i  i  g      @iL  )nprandomZRandomStateuniquerandintZastypeintpZrandlenr   zipAssertionErrorappendrange)rngkeysvaluesdkeyvaluei r   F/tmp/pip-unpacked-wheel-zrfo1fqw/sklearn/utils/tests/test_fast_dict.pytest_int_float_dict   s    
r   c                  C   s>   t jdt jd} t jdt jd}t| |}t|dks:td S )Nr   )Zdtype)r   r   )r	   Zaranger   Zfloat64r   r   r   )r   r   r   r   r   r   test_int_float_dict_argmin   s    
r   )__doc__Znumpyr	   Zsklearn.utils._fast_dictr   r   r   r   r   r   r   r   <module>   s   