U
    md                  
   @   s   d Z ddlZddlZddlmZmZ ddlmZm	Z	m
Z
 dd Zdd Zejd	ejedd
dedddf ddgddgfedd
dddfgdd ZdS )zH
unit test for spline and other smoother classes

Author: Luca Puggini

    N)assert_allcloseassert_equal)UnivariatePolynomialSmootherPolynomialSmootherBSplinesc                  C   sL   t ddd} t| dd}t|jjd t|jd d df |  d  d S )Nr            degree)r   r	      )nplinspacer   r   basisshaper   Zravel)xZpol r   `/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/statsmodels/gam/tests/test_smooth_basis.py#test_univariate_polynomial_smoother   s    r   c                  C   sp   t jd t jddd} ddg}t| |}t|D ]4\}}t| d d |f |dj}t|j	| j| q6d S )Nr   r   )
   r   r	      r
   )
r   randomseednormalr   	enumerater   r   r   Z	smoothers)r   degreesZmpsidegZuv_basisr   r   r   "test_multivariate_polynomial_basis   s    
r   zx, df, degreer   d   r   r      r	   c                 C   s   t | ||}||  d S )N)r   Z	transform)r   Zdfr   Zbspliner   r   r   test_bsplines"   s    r!   )__doc__Zpytestnumpyr   Znumpy.testingr   r   Zstatsmodels.gam.smooth_basisr   r   r   r   r   markZparametrizeZc_r   r!   r   r   r   r   <module>   s    
 