ó
î&]\c           @` s²   d  Z  d d l m Z m Z m Z d d l m Z m Z m Z m	 Z	 d d l Z
 d d l m Z m Z d d l m Z d d l m Z m Z m Z m Z d e f d	 „  ƒ  YZ d S(
   s'    module to test interpolate_wrapper.py
i    (   t   divisiont   print_functiont   absolute_import(   t   aranget   allcloset   onest   isnanN(   t   assert_t   assert_allclose(   t   suppress_warnings(   t   lineart   logarithmict   block_average_abovet   nearestt   Testc           B` sJ   e  Z d  d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   gñhãˆµøä>c         C` sW   xP t  | ƒ D]B \ } } t t | | | | ƒ pK t | ƒ oK t | | ƒ ƒ q Wd  S(   N(   t	   enumerateR   R   R   (   t   selft   xt   yt   rtolt   it   xi(    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   assertAllclose   s    c         C` s~   d } t  | ƒ } t  | ƒ } t ƒ  Q } | j t d ƒ t | t | | | d ƒ ƒ t | t | | | d ƒ ƒ Wd  QXd  S(   Ni   s   `nearest` is deprecatedgš™™™™™¹?(   R   R	   t   filtert   DeprecationWarningR   R   (   R   t   NR   R   t   sup(    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   test_nearest   s    c         C` s†   d } t  | ƒ } t  | ƒ } t  | ƒ d } t ƒ  ) } | j t d ƒ t | | | ƒ } Wd  QXt | d  d d d d d g ƒ d  S(	   Ng     p§@g      à?s   `linear` is deprecatedi   g      ø?g      @g      @g      @(   R   R	   R   R   R
   R   (   R   R   R   R   t   new_xR   t   new_y(    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   test_linear   s    c         C` s–   d } t  | d t ƒ} t  | d t ƒ} t  | d ƒ d } t ƒ  ) } | j t d ƒ t | | | ƒ } Wd  QXt | d  d d d d	 d
 g ƒ d  S(   Ni¸  t   dtypei   s#   `block_average_above` is deprecatedi   g        g      à?g      @g      @g      @(   R   t   floatR	   R   R   R   R   (   R   R   R   R   R   R   R   (    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   test_block_average_above)   s    c         C` sù   d } t  | d t ƒ} t d | f ƒ t  | ƒ } t  | ƒ d } t ƒ  ) } | j t d ƒ t | | | ƒ } Wd  QXt | d  d … d  d … f d d d d	 d
 g d d d d	 d
 g d d d d	 d
 g d d d d	 d
 g d d d d	 d
 g g ƒ d  S(   Ni¸  R   id   g      à?s   `linear` is deprecatedi   g      ø?g      @g      @g      @(   R   R    R   R	   R   R   R
   R   (   R   R   R   R   R   R   R   (    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   test_linear24   s    c         C` s   d } t  | ƒ } t  | ƒ } t  | ƒ d } t ƒ  ) } | j t d ƒ t | | | ƒ } Wd  QXt j d d d d g } t | d  | ƒ d  S(	   Ng     @¯@g      à?s   `logarithmic` is deprecatedgß'Üež ö?g€©Ž˜@gn]ÿèz¶@gFB›wã@i   (   R   R	   R   R   R   t   npt   NaNR   (   R   R   R   R   R   R   R   t	   correct_y(    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   test_logarithmicC   s    c         B` sU   g  e  |  ƒ D]! } | j d ƒ d k r | ^ q } x | D] } d | d  Uq; Wd  S(   Nt   test_i    s	   self.%s()(   t   dirt   find(   R   t   namet	   test_listt	   test_name(    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   runTestN   s    4(	   t   __name__t
   __module__R   R   R   R!   R"   R&   R-   (    (    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyR      s   						(   t   __doc__t
   __future__R    R   R   t   numpyR   R   R   R   R#   t   numpy.testingR   R   t   scipy._lib._numpy_compatR	   t%   scipy.interpolate.interpolate_wrapperR
   R   R   R   t   objectR   (    (    (    sO   lib/python2.7/site-packages/scipy/interpolate/tests/test_interpolate_wrapper.pyt   <module>   s   ""