ó
íYc           @   s>   d  Z  d d l m Z d d l Z e   d  Z d   Z d S(   s,   Check that functions can handle scalar inputi˙˙˙˙(   t   assert_array_almost_equalNc   	      C   sa   d } d } | g t  |  } |  |   } | |   } | |  j | f } t | | d | d S(   sG   Test that bn.xxx gives the same output as bn.slow.xxx for scalar input.s   
func %s | input %s
i÷˙˙˙t   err_msgN(   t   listt   __name__R    (	   t   funct   func0t   argst   msgt   at   argsit   actualt   desiredR   (    (    sA   lib/python2.7/site-packages/bottleneck/tests/scalar_input_test.pyt
   unit_maker   s    c          c   s^   t  j d  t  j d  }  x; |  D]3 } | j d k r# t | t d | j  f Vq# q# Wd S(	   s   Test scalar inputt   reducet   nonreduce_axist	   partitiont   argpartitiont   pushs
   bn.slow.%sN(   R   R   R   (   t   bnt   get_functionsR   R   t   eval(   t   funcsR   (    (    sA   lib/python2.7/site-packages/bottleneck/tests/scalar_input_test.pyt   test_scalar_input   s    (   t   __doc__t   numpy.testingR    t
   bottleneckR   t   tupleR   R   (    (    (    sA   lib/python2.7/site-packages/bottleneck/tests/scalar_input_test.pyt   <module>   s   