
\Ic           @   s   y d  d l  m Z Wn- e k
 rC d  d l m Z e d   n Xd  d l m Z d  d l Z d e j f d     YZ	 e
 d k r e j d	 d
  Z e j d e  n  d S(   i(   t   array(   t   MissingExternalDependencyErrors7   Install NumPy if you want to use Bio.Statistics.lowess.(   t   lowessNt   test_lowessc           B   s   e  Z d    Z RS(   c         C   s   t  d d d d d d d g  } | d } t  d	 d
 d d d d d g  } t | | d d d d d } x0 t | |  D] \ } } |  j | | d  q{ Wd  S(   Ng        g      ?g       @g      @g      @g      "@g      &@i   gEDֿgiK?gX@g}B'@gb\y/<@g.U咶U@gV25]@t   ft   iteri   i   (   R    R   t   zipt   assertAlmostEqual(   t   selft   xt   yt   yst   outputt   precomputedt
   calculated(    (    s   test_lowess.pyt   test_Precomputed   s    !
(   t   __name__t
   __module__R   (    (    (    s   test_lowess.pyR      s   t   __main__t	   verbosityi   t
   testRunner(   t   numpyR    t   ImportErrort   BioR   t   Bio.Statistics.lowessR   t   unittestt   TestCaseR   R   t   TextTestRunnert   runnert   main(    (    (    s   test_lowess.pyt   <module>   s   