U
    Hvfp
                     @   sx   d dl Zd dlmZmZmZ d dlmZmZm	Z	m
Z
 dd Zdd Zdd	 Zd
d Zdd Zdd Zdd Zdd ZdS )    N)assert_equalassert_almost_equalassert_allclose)boxcoxboxcox1p
inv_boxcoxinv_boxcox1pc                  C   s   t ddddg} t| d}t|t |  t| d}t|| d  t| d}t|d| d d   t dddg}td|}t|d|  d S )N      ?         r         )nparrayr   r   logxylam r   C/tmp/pip-unpacked-wheel-96ln3f52/scipy/special/tests/test_boxcox.pytest_boxcox_basic   s    



r   c                  C   s*   d} d}t | |}t|t| dd d S )Ng     ?P7xf +=Zrtol)r   r   r   r   r   Zlmbdar   r   r   r   test_boxcox_underflow   s    
r   c                  C   sn   t dddg} t| dddg}t|t t jt jt jg d} t| ddg}t|t t j t j g d S )Ng      r	          @      r         )r   r   r   r   naninfr   r   r   r   r   test_boxcox_nonfinite#   s    r$   c               	   C   s   t dddddddg} t| d}t|t |  t| d}t||  t| d}t|d	|  d|    t d	ddg}td
|}t|d|  d S )Ng      пg#Bǻr   g#B;g      ?r
      r   r	   r   r   )r   r   r   r   log1pr   r   r   r   test_boxcox1p_basic/   s    




r'   c                  C   s>   t ddg} t ddg}t| |}t|t | dd d S )NV瞯<r   gC]r2<r   r   )r   r   r   r   r&   r   r   r   r   test_boxcox1p_underflowD   s    
r)   c                  C   sn   t dddg} t| dddg}t|t t jt jt jg d} t| ddg}t|t t j t j g d S )Nr   r	   r   r   r    r   )r   r   r   r   r!   r"   r#   r   r   r   test_boxcox1p_nonfiniteK   s    r+   c                  C   s   t dddg} t dddg}t| |}t||}t| | t dddg} t dddg}t| |}t||}t| | d S )Ng        g      ?r   )r   r   r   r   r   r   r   )r   r   r   Zx2r   r   r   test_inv_boxcoxW   s    




r,   c                  C   s$   d} d}t | |}t|| dd d S )Nr(   r   r   r   )r   r   )r   r   r   r   r   r   test_inv_boxcox1p_underflowe   s    
r-   )Znumpyr   Znumpy.testingr   r   r   Zscipy.specialr   r   r   r   r   r   r$   r'   r)   r+   r,   r-   r   r   r   r   <module>   s   