ó
àÆ÷Xc           @` sá   d  d l  m Z m Z m Z d  d l m Z m Z d  d l Z d  d l Z d  d l	 m
 Z
 d d l m Z d  d l Z d  d l Z d  d l m Z d e j f d	 „  ƒ  YZ d
 e j f d „  ƒ  YZ e d k rÝ e j ƒ  n  d S(   i    (   t   absolute_importt   print_functiont   division(   t   xlogxt   xlogy0N(   t   as_tensor_variablei   (   t
   test_basic(   t   unittest_toolst   T_XlogXc           B` s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C` s   t  j ƒ  d  S(   N(   t   uttt   seed_rng(   t   self(    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyt   setUp   s    c         C` se   t  d d g ƒ } t | ƒ } t j g  | g ƒ } |  j t j | ƒ  t j d d g ƒ k ƒ ƒ d  S(   Ni   i    g        (   R   R   t   theanot   functiont
   assertTruet   numpyt   allt   asarray(   R   t   xt   yt   f(    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyt   test0   s    c         C` s&   t  j t t j j d d ƒ g ƒ d  S(   Ni   i   (   R	   t   verify_gradR   R   t   randomt   rand(   R   (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyt   test1   s    (   t   __name__t
   __module__R   R   R   (    (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyR      s   		t   T_XlogY0c           B` s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C` s   t  j ƒ  d  S(   N(   R	   R
   (   R   (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyR       s    c         C` s8   t  j t t j j d d ƒ t j j d d ƒ g ƒ d  S(   Ni   i   (   R	   R   R   R   R   R   (   R   (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyt   test2"   s    c         C` sw   t  d d g ƒ } t  d d g ƒ } t | | ƒ } t j g  | ƒ } |  j t j | ƒ  t j d d g ƒ k ƒ ƒ d  S(   Ni   i    g        (   R   R   R   R   R   R   R   R   (   R   R   R   t   zR   (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyt   test3%   s
    (   R   R   R   R   R    (    (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyR      s   		t   __main__(   t
   __future__R    R   R   t   theano.tensor.xlogxR   R   t   unittestR   t   theano.tensorR   t    R   t   TTR   t   numpy.randomR   t   theano.testsR   R	   t   TestCaseR   R   R   t   main(    (    (    s>   /tmp/pip-build-X4mzal/theano/theano/tensor/tests/test_xlogx.pyt   <module>   s   