
&]\c           @` s  d  Z  d d l 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 Z d d l Z d d l m Z d d l j Z d d l m Z d d l m Z m Z m Z m Z d d	 l m Z m Z m Z m Z m Z m Z m  Z  m! Z! m" Z" m# Z# d d
 l$ m% Z% m& Z& m' Z' m( Z( m) Z) m* Z* y d d l+ Z+ Wn e, k
 r`e d  Z+ n Xe j- d  j. d k  Z/ e e+ d  d    Z0 e e+ d  d    Z1 e e+ d  d    Z2 e e+ d  d    Z3 e e+ d  d    Z4 e e+ d  d    Z5 e e+ d  d    Z6 e e+ d  d    Z7 e e+ d  e j8 j9 d     Z: e e+ d  d    Z; e e+ d  d    Z< e e+ d  d    Z= d  Z> e e+ d  d!    Z? e e+ d  d"    Z@ e e+ d  e j8 j9 d#     ZA e e+ d  e j8 j9 d$     ZB e e+ d  d%    ZC e e+ d  d&    ZD e e+ d  e j8 j9 d'     ZE e e+ d  e j8 j9 d(     ZF e e+ d  d)    ZG e e+ d  d*    ZH e e+ d  d+    ZI d,   ZJ e j8 j9 e e+ d  d-     ZK e j8 j9 e e+ d  d.     ZL e j8 j9 e e+ d  d/     ZM e j8 j9 e e+ d  d0     ZN eO d1 d2 d3 d2  ZP e j8 j9 e e+ d4  d5 eQ f d6     Y  ZR d S(7   s4   
Test Scipy functions versus mpmath, if available.

i    (   t   divisiont   print_functiont   absolute_importN(   t   assert_t   assert_allclose(   t   pi(   t   LooseVersion(   t   with_metaclass(   t   MissingModulet   check_versiont   FuncDatat   assert_func_equal(
   t   Argt   FixedArgt
   ComplexArgt   IntArgt   assert_mpmath_equalt   nonfunctional_tooslowt
   trace_argst   time_limitedt   exception_to_nant
   inf_to_nan(   t   _sinpit   _cospit   _lgam1pt   _lanczos_sum_expg_scaledt   _log1pmxt	   _igam_fact   mpmathi   s   0.10c          C` s   g  }  x} t  j d d d  D]f } x] t  j d d t  j d  D]? } | t  j d |  } |  j | t t j |   f  q? Wq Wt  j	 |  d t  j
 }  t t j |  d d  j   d  S(	   Nii   i
   i    i   y              ?t   dtypei   (   t   npt   logspacet   linspaceR   t   expt   appendt   complexR   t   eit   arrayt   complex_R
   t   sct   expit   check(   t   datasett   rt   pt   z(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_expi_complex)   s    #*s   0.19c          C` s   g  }  xr d d g D]d } x[ t  j d d d  D]D } t j d  - |  j | | t t j | |   f  Wd  QXq/ Wq Wt  j |   }  t t	 j
 |  d d d	 d
 j   d  S(   Ni2   i3   i    i   i   id   i   i   t   rtolgvIh%<=(   i    i   (   R   R   R   t   workdpsR"   t   floatt   expintt   asarrayR
   R'   t   expnR)   (   R*   t   nt   x(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_expn_large_n9   s    6c          C` s   g  }  d d d d d d g } x | D]z } xq | D]i } x` | D]X } | d | } t  j d   t t  j | |   } Wd  QX|  j | | | f  q? Wq2 Wq% Wt j |   }  t d	   |  d d d d j   d  S(   Ng     Xg      #g      g      ?g      #@g     X@y              ?ix   c         S` s   t  j |  j |  S(   N(   R'   t   hyp0f1t   real(   t   vR-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   <lambda>[   s    i    i   i   R/   gvIh%<=(   i    i   (	   R   R0   R#   R8   R"   R   R%   R
   R)   (   R*   t   axisR:   R6   t   yR-   t   res(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp0f1_gh5764J   s    "c          C` su   t  j d d d  }  t j |  d  } t  j g  |  D] } t j | d  ^ q4  } t | | j t  d d d  S(   Ni   i   i   g      ?R/   g-q=(	   R   R    R'   R8   R%   R   R   t   astypeR1   (   t   vvt   afR:   t   mf(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp0f1_gh_1609_   s    .s   1.0.0c          C` s  d d g }  |  t  t j d d d d g d d	  7}  g  |  D]Z \ } } } } | | k r> t |  | k r> | d
 k  r> | d k r> | | | | f ^ q> }  t d t  } g  |  D]% } | t t j | |    f ^ q } t	 j
 | d t	 j } t t j | d d	 d d j   d  S(   Ni   igffffff?ii   gffffffit   repeati   i    t	   eliminateR   i   R/   g|=(   i   iigffffff?(   i   iigffffff?(   i    i   i   i   (   t   listt	   itertoolst   productt   roundt   dictt   TrueR1   R   t   hyp2f1R   R%   t   float_R
   R'   R)   (   t   ptst   at   bt   cR6   t   kwR,   R*   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp2f1_strange_pointsl   s    	+N2s   0.13c          C` s  d/ d0 d1 d2 d3 f d4 d5 d6 d7 f d8 d9 d: d; d< d d= d d f d d> d d f d? dA dB dC dD dE dF dG dH dI d' dJ d) dK f g }  g  |  D]" } | t  t j |    f ^ q } t j | d* t j } t j d+ d,  } z& t t j | dL d d- d. j	   Wd  t j |   Xd  S(M   Ni   i   i   i    g      ?g       @g      @i   g      ;@i    i   g      @g      T@iQ   iig      gx&?iig333333?g      ?g+?i   gGz?g      g      @g      
ig*4]92@g|O%@gCu?ii  g      %g      %@g      i   g      ?g     p@g      ?R   t   invalidt   ignoreR/   g|=(   i   i   i   i    gUUUUUU?gUUUUUU?g?g      ?g      ?g      ?g      ?gX<ݚ?(   i   iii   (   i   iii   (   i   g      g      i   (   i   i   i   i    (   gx&?iig333333?gUUUUUU?gUUUUUU?(   i   i   i   gGz?g      ?(   g      ?g      i   gGz?(   i   g      @g      
g+?(   ig*4]92@g|O%@gCu?(   ii  g      %gGz?(   ii  g      %@gGz?(   ii   i   g      ?(   ii   i   g      (   ii   i   g      ?(   ii   i   g      g     pgm˟?(   i    i   i   i   (
   R1   R   RM   R   R%   RN   t   seterrR
   R'   R)   (   RO   R,   R*   t   olderr(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp2f1_real_some_points~   s6    /&s   0.14c          C` s   d d d d f d d g }  d
   } g  |  D]1 } t  t | |   t t j |    f ^ q+ } t j | d t j } t t	 j | d d d d j
   d  S(   Nip   i3   i
   igwJi|g      %@gGz?g      %c         S` s-   t  |  t  r% t |  d  |  d S|  Sd  S(   Ni    i   (   t
   isinstancet   tupleR1   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   fev   s    R   i    i   i   i   i   R/   g|=(   i3   i
   (   ii
   (   i
   i|g      %@gGz?(   i
   i|g      %gGz?(   i    i   i   i   (   R[   t   mapR1   R   RM   R   R%   RN   R
   R'   R)   (   RO   R\   R,   R*   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp2f1_some_points_2   s    		>c          C` sL  g  }  x d d d d d d g D] } x d d d	 d
 g D] } x d d d d g D] } x{ d d d d d d d d g D][ } y" t  t j | | | |   } Wn t k
 r qv n X|  j | | | | | f  qv WqQ Wq8 Wq Wt j |  d t j }  t j d d  } z, t	 t
 j |  d d d d d t j   Wd  t j |   Xd  S(   Niigg?i   i
   g      ii   g@igffffff4@g)\(gGzi    g333333?gffffff?g      ?R   RU   RV   i   i   i   R/   g&.>t   ignore_inf_sign(   i    i   i   i   (   R1   R   RM   t	   ExceptionR"   R   R%   RN   RW   R
   R'   RL   R)   (   R*   RP   RQ   RR   R-   R:   RX   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp2f1_real_some   s     %",s   0.12c          C` s  d }  t  j |  d f t  j  } t  j j d  t  j j d |   | d  d   d f <t  j j d |   | d  d   d f <t  j j d |   | d  d   d f <d t  j j |   d | d  d   d f <| d  d   d f c d	 t  j j d |   9<| d  d   d f c d	 t  j j d |   9<| d  d   d f c d	 t  j j d |   9<x | D]~ } t j	 d
 k  rt
 | d   j   t
 | d  k rt
 | d   j   | d <qn  t t j t | d      | d <q^Wt t j | d d d d j   d  S(   Ni  i   i  g      ?i    i   i   i   is   0.14i   R/   g&.>(   i    i   i   i   (   R   t   zerosRN   t   randomt   seedt   paretot   randt   randintR   t   __version__t   abst   maxR1   RM   R[   R
   R'   R)   (   t   npointsR*   t   ds(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp2f1_real_random   s     %%%*///& 'c          C` s:  t  j j t  j j }  } z d t  j _ t j t j d d d  t j d d d   \ } } t j t j d d d  t j d d d   \ } } t j | j	   | j	   f d t j | j	   | j	   f } t
 t j d	   | d
 t d d t
 t j d   | d
 t d d Wd  |  | t  j _ t  j _ Xd  S(   NiF   ii   i   i   ig?y              ?c         S` s   t  t j |    S(   N(   R#   R   t   erf(   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;      s    t
   vectorizedR/   gvIh%<=c         S` s   t  t j |    S(   N(   R#   R   t   erfc(   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;      s    (   R   t   mpt   dpst   precR   t   meshgridR    R   t   r_t   ravelR   R'   Rn   t   FalseRp   (   t   old_dpst   old_prect   x1t   y1t   x2t   y2t   points(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_erf_complex   s    66@s   0.15c          C` s  g  }  xbd d d d d g D]K} |  j  d d | f d d | f d d | f d d | f d d | f d d	 | f d d | f d d
 | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f d d | f g  q Wd   } g  |  D]+ } | | | d | d | d  f ^ q{} t j | d t j } d   } t j d d  } z) t | | d# d d d  d! d" j   Wd  t j |   Xd  S($   NgGzgmgư>gL7A`?i   iig333333?g333333gi
   i   i   i   i   iiiig @g&@g g&c         S` sH   | t  |  k r5 | d k r5 | d k r. d Sd Sn  t j |  | |  S(   Ni   i    (   t   intR   t   legenp(   t   nut   muR6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mplegenp!  s
    i    i   R   c         S` s   t  j |  j t  | |  S(   N(   R'   t   lpmvR@   R   (   R   R   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   evf-  s    RU   RV   R/   g|=t   atolg+=(   i    i   i   (   t   extendR   R%   RN   RW   R
   R)   (   RO   R6   R   R,   R*   R   RX   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_lpmv   sJ    		8	)c          C` sn  t  j j d  t  j t  j d d d  t  j d d d  t  j d d d  t  j d d	 d  t  j d d	 d  d
 d d d d d f
 }  |  } t  j t  j | d  d   d  f |  d  d  d   f   j	 d d  j
 } t j j t j j } } zZ d t j _ t t j d   | d t d d d t t t j d   | d t d d Wd  | | t j _ t j _ Xd  S(   Ni  i8i   i   ii
   ii   i   g      ?gffffffig33333Yg3333i   i  c         S` s   t  t j |  |   S(   N(   R1   R   t   beta(   RP   RQ   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   N  s    Ro   R/   g|=R_   c         S` s%   t  t j t t j |  |     S(   N(   R1   R   t   logRi   R   (   RP   RQ   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   V  s    (   R   Rc   Rd   Ru   R   t   arangeR%   t   broadcast_arrayst   Nonet   reshapet   TR   Rq   Rr   Rs   R   R'   R   Rw   RL   t   betaln(   RQ   RP   t   abRx   Ry   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_beta;  s2    J	g?c          C` s   t  t j d d d d d g  }  t j d d t j d  } t j |  |  \ }  } |  t j d |  } t j d	 | d | f j   } g  } x0 | D]( } | j	 | t
 t j |   f  q Wt j |  } t t j | d d	 d
 d j   d  S(   Ngg{Gzi    g{Gz?g?i   i   y              ?i   R/   gvIh%,=(   t   LOGGAMMA_TAYLOR_RADIUSR   R%   R    R   Rt   R!   Ru   t   flattenR"   R#   R   t   loggammaR
   R'   R)   (   R+   t   thetat   dzR-   R*   t   z0(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_loggamma_taylor_transitione  s    "!&c          C` s   t  j d t  j t  d  }  t  j d d t  j d  } t  j |  |  \ }  } |  t  j d |  } t  j d | d | f j	   } g  } x0 | D]( } | j
 | t t j |   f  q Wt  j |  } t t j | d d d d	 j   d  S(
   Nii
   i    i   i   y              ?i   R/   gvIh%,=(   R   R   t   log10R   R    R   Rt   R!   Ru   R   R"   R#   R   R   R%   R
   R'   R)   (   R+   R   R   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_loggamma_taylorx  s    !&c       
   C` s2  t  j t  j d d d  d t  j d d d  f }  |  j   } t  j |  |  \ }  } |  d | } t  j d d d  j d d d  } | t  j | f | j  j	   } g  } t
 j d  8 x0 | D]( } | j | t t
 j |   f  q WWd  QXt  j |  } t t j | d d d	 d
 j   d  S(   Niii   i    y              ?iVi   id   R/   g-q=(   R   Ru   R   t   copyRt   R   R   t   dstackt   sizeR   R   R0   R"   R#   t   rgammaR%   R
   R'   R)   (   t   dxt   dyR   Rb   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_rgamma_zeros  s    5$#,c       
   C` so  t  j t  j d  }  t |   g } t  j t  j d  }  | j t |    t j |  } t j d t j d d d  d t j d d d  d f } | j	   } t j
 | |  \ } } | d	 | } | t j | f | j  j   } g  } t  j d
  8 x0 | D]( } | j | t t  j |   f  qWWd  QXt j |  } t t j | d d d d j   d  S(   Ng      ?g      gQοiii
   i    gQ?y              ?i   i   R/   g+=(   R   t   findroott   digammaR1   R"   R   R%   Ru   R   R   Rt   R   R   R   R0   R#   R
   R'   R)   (   t   roott   rootsR   R   R   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_digamma_roots  s     ;#,c       	   C` s  t  t j  }  t j d d d  } t j t j d d d  d t j d d d  f } t j | |  \ } } | d | j   } g  } t j d  ; x3 | D]+ } |  |  } | j	 | t
 |  f  q WWd  QXt j |  } t t j | d d	 d
 d j   d  S(   Ni,  iid   i    ii   y              ?i(   i   R/   gvIh%<=(   R   R   R   R   R   Ru   Rt   R   R0   R"   R#   R3   R
   R'   R)   (   R   R6   R=   R-   R*   R   R>   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_digamma_negreal  s    5#c       	   C` s   t  j d d d  }  t  j d d d d g  } t  j |  |  \ }  } |  d | j   } g  } t j d	  > x6 | D]. } t j |  } | j | t	 |  f  qz WWd  QXt  j
 |  } t t j | d
 d d d j   d  S(   Ni,  iid   gffffffgg@gffffff@y              ?i   i    i   R/   gvIh%<=(   R   R   R%   Rt   R   R   R0   R   R"   R#   R3   R
   R'   R)   (   R6   R=   R-   R*   R   R>   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_digamma_boundary  s    #c          C` s  d }  t  j d |  d |  d  } | j   } t  j | |  \ } } | j   | j   } } g  } t j d  V xN t | |  D]= \ } } | j | | t	 t j
 | d | d t  f  q WWd  QXt  j |  } t t j
 | d d d
 d j   d  S(   Ni   g      ?i   i2   id   RQ   t   regularizedi    i   R/   g-q=(   i    i   (   R   R    R   Rt   R   R   R0   t   zipR"   R1   t   gammaincRL   R%   R
   R'   R)   (   t   smallRP   R6   R*   t   a0t   x0(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gammainc_boundary  s    ;c          C` s   d   }  t  j d d  } t  j d d t  } d t  j | t  j d |   j   } g  } x' | D] } | j | |  |  f  qg Wt  j |  } t t	 j
 | d d d d	 j   d  S(
   Nc         S` s   t  t j d d |    S(   Ni   i   (   R#   R   t   polylog(   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   spence  s    g      ?g      ?i    i   i   y              ?R/   g+=(   R   R    R   t   outerR!   R   R"   R%   R
   R'   R   R)   (   R   R+   R   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spence_circle  s    	)c          C` s/  t  j t  j }  t  j t  j d d d  d t  j d d d  f } | j   } t  j | |  \ } } | d | } t  j d d d  j	 d d d  } | t  j
 | f | j  j   } g  } x0 | D]( } | j | t t j |   f  q Wt  j |  } t t | d d d	 d
 |  j   d  S(   Ni    ii   y              ?iid   i   iR/   i   (   R   t   finfoR1   t   epsRu   R   R   Rt   R   R   R   R   R   R"   R#   R   t   sinpiR%   R
   R   R)   (   R   R   R   R   Rb   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_sinpi_zeros  s    5$#&c          C` s3  t  j t  j }  t  j t  j d d d  d t  j d d d  f } | j   } t  j | |  \ } } | d | } t  j d d d  d j	 d d d	  } | t  j
 | f | j  j   } g  } x0 | D]( } | j | t t j |   f  q Wt  j |  } t t | d d d
 d |  j   d  S(   Ni    ii   y              ?iid   i   g      ?iR/   i   (   R   R   R1   R   Ru   R   R   Rt   R   R   R   R   R   R"   R#   R   t   cospiR%   R
   R   R)   (   R   R   R   R   Rb   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_cospi_zeros0  s    5(#&c    	      C` s   d   }  d   } t  j d d d  } t  j t  j d d d  d t  j d d d  f } g  } x] | D]U } t t j |   } x7 | D]/ } | | } | j | | | | |  f  q Wqi Wt  j |  } t	 |  | d d	 d
 d j
   d  S(   Nc         S` s   t  j |  |  d S(   Ni   (   R'   t   ellipj(   t   ut   m(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   dnG  s    c         S` s   t  t j d d |  d |  S(   NR   R   R   (   R1   R   t   ellipfun(   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   mpmath_dnJ  s    i    i   i   iii
   i   R/   g|=(   i    i   (   R   R    Ru   R   R1   R   t   ellipkR"   R3   R
   R)   (	   R   R   R   t   duR*   t   m0t   u0t   du0R,   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_dn_quarter_periodE  s    		5
'c         C` sh   t  j |  S t  j |   }  t  j |  j t  j d t  j  } t  j t  j |   |  } Wd  QX| S(   Ni   (   R   R0   t   mpct   ceilt   imagR   t   lambertwR!   (   R-   Rr   t   unwindR>   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   _mpmath_wrightomega^  s
    $!c    
      C` s  t  j d d d  }  t  j t  j t  j  g } t  j t  j t  j  g } t  j t  j t  j  g } t  j t  j t  j  g } x t d  D] } | j t  j | d t  j   | j t  j | d t  j   | j t  j | d t  j   | j t  j | d t  j   q Wt  j | | | | f  } t  j |  |  \ }  } |  d | j	   } g  } x0 | D]( }	 | j |	 t
 t |	 d   f  qsWt  j |  } t t j | d d d d	 j   d  S(
   Ni
   i    i   i2   iy              ?i   R/   g:0yE>(   R   R   t	   nextafterR   t   inft   rangeR"   t   hstackRt   R   R#   R   R3   R
   R'   t   wrightomegaR)   (
   R6   t   picut_abovet   picut_belowt   npicut_abovet   npicut_belowt   iR=   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_wrightomega_branchf  s$     ! %&c          C` s   t  j d d  }  t  j d d t  j  } t  j |  |  \ }  } |  d | j   } g  } x0 | D]( } | j | t t | d   f  qd Wt  j |  } t	 t
 j | d d d d j   d  S(	   Nii   i   y              ?i   i    R/   gV瞯<(   R   R    R   Rt   R   R"   R#   R   R3   R
   R'   R   R)   (   R6   R=   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_wrightomega_region1  s    &c          C` s   t  j d d  }  t  j d t  j d  } t  j |  |  \ }  } |  d | j   } g  } x0 | D]( } | j | t t | d   f  qd Wt  j |  } t	 t
 j | d d d d j   d  S(	   Nii   iy              ?i   i    R/   gV瞯<(   R   R    R   Rt   R   R"   R#   R   R3   R
   R'   R   R)   (   R6   R=   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_wrightomega_region2  s    &c          C` s   t  j d d d  t  j d d d  }  } t  j |  |  \ }  } |  d | j   } g  } x0 | D]( } | j | t t j |   f  qd Wt  j |  } t	 t
 j | d d d d j   d  S(   Nii   i   y              ?i    R/   gvIh%<=(   R   R    Rt   R   R"   R#   R   R   R3   R
   R'   R)   (   R6   R=   R-   R*   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_lambertw_smallz  s    +&t   maxpreci   t   maxtermss   0.17t   TestSystematicc           B` s  e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e j j d e d d  d    Z d   Z  e j j d e d d  d    Z! d   Z" d    Z# d!   Z$ d"   Z% d#   Z& d$   Z' d%   Z( d&   Z) d'   Z* d(   Z+ d)   Z, d*   Z- d+   Z. d,   Z/ d-   Z0 d.   Z1 d/   Z2 d0   Z3 d1   Z4 d2   Z5 d3   Z6 d4   Z7 d5   Z8 d6   Z9 d7   Z: d8   Z; d9   Z< d:   Z= d;   Z> d<   Z? d=   Z@ d>   ZA d?   ZB d@   ZC dA   ZD dB   ZE dC   ZF dD   ZG dE   ZH dF   ZI dG   ZJ dH   ZK dI   ZL dJ   ZM dK   ZN dL   ZO e j j d e  dM    ZP dN   ZQ e j j d e  dO    ZR eS dP    ZT dQ   ZU dR   ZV e j j d e d dS  dT    ZW dU   ZX dV   ZY e j j d e  dW    ZZ e j j d e  dX    Z[ eS dY    Z\ e j j d e  dZ    Z] e j j d[ e^ d d\  d]    Z_ d^   Z` d_   Za e j j d e  d`    Zb da   Zc db   Zd dc   Ze eS dd    Zf de   Zg e j j d[ e^ d df  dg    Zh dh   Zi eS di    Zj dj   Zk dk   Zl dl   Zm dm   Zn e j j d e d dn  do    Zo eS dp    Zp dq   Zq dr   Zr e j j d e  ds    Zs e j j d e d dt  du    Zt dv   Zu e j j d e d dw  dx    Zv dy   Zw dz   Zx e j j d d{  d|    Zy d}   Zz d~   Z{ d   Z| d   Z} d   Z~ d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e j j d e d d  d    Z RS(   c         C` sN   t  d   t j t d d  g d d t  d   t j t d d  g  d  S(	   Nc         S` s   t  j |   d S(   Ni    (   R'   t   airy(   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g    חg    חAR/   gh㈵>c         S` s   t  j |   d S(   Ni    (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g     @g     @@(   R   R   t   airyaiR   (   t   self(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airyai  s    		c         C` s    t  d   t j t   g  d  S(   Nc         S` s   t  j |   d S(   Ni    (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airyai_complex  s    	c         C` sN   t  d   d   t d d  g d d t  d   d   t d	 d
  g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  d d S(   Nt
   derivativei   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g    חg    חAR/   gh㈵>c         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  d d S(   NR   i   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g     @g     @@(   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airyai_prime  s
    c         C` s    t  d   d   t   g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  d d S(   NR   i   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airyai_prime_complex  s    c         C` sN   t  d   d   t d d  g d d t  d   d   t d	 d
  g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |   S(   N(   R   t   airybi(   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g    חg    חAR/   gh㈵>c         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |   S(   N(   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g     @g     @@(   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airybi  s
    c         C` s    t  d   d   t   g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |   S(   N(   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airybi_complex  s    c         C` sN   t  d   d   t d d  g d d t  d   d   t d	 d
  g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  d d S(   NR   i   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g    חg    חAR/   gh㈵>c         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  d d S(   NR   i   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g     @g     @@(   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airybi_prime  s
    c         C` s    t  d   d   t   g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  d d S(   NR   i   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_airybi_prime_complex  s    c         C` s,   t  t j t d    t d d  g  d  S(   Nc         S` s   t  j d |  t  S(   Ni    (   R   t   beit   HYPERKW(   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g     @g     @@(   R   R'   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_bei  s    	c         C` s,   t  t j t d    t d d  g  d  S(   Nc         S` s   t  j d |  t  S(   Ni    (   R   t   berR   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g     @g     @@(   R   R'   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ber   s    	c         C` s2   t  d   d   t d d  g d d d d d  S(   Nc         S` s   t  j t |    t |   S(   N(   R'   t	   bernoulliR   (   R5   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  t j t |     S(   N(   R1   R   R   R   (   R5   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i2  R/   g&.>R5   (   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_bernoulli  s    	c         C` s8   t  t j t d    t d d  t   g d d d  S(   Nc         S` s   t  j |  | t  S(   N(   R   t   besseliR   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g}Ô%Ig}Ô%ITR   gJD(   R   R'   t   ivR   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besseli  s    	c         C` s2   t  d   t d    t d d  t   g  d  S(   Nc         S` s   t  j |  j |  S(   N(   R'   R   R9   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  | t  S(   N(   R   R   R   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g}Ô%Ig}Ô%IT(   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besseli_complex  s    	c         C` s~   t  t j t d    t d d  t d d  g d t t  t j t d    t d d  t d d	  g d t d
 d d  S(   Nc         S` s   t  j |  | t  S(   N(   R   t   besseljR   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g}Ô%Ig}Ô%ITg     @g     @@R_   c         S` s   t  j |  | t  S(   N(   R   R   R   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g    חg    חAR/   gh㈵>(   R   R'   t   jvR   R   RL   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besselj  s    		c         C` s,   t  d   t d    t   t   g  d  S(   Nc         S` s   t  j |  j |  S(   N(   R'   R   R9   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   $  s    c         S` s   t  j |  | t  S(   N(   R   R   R   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   %  s    (   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besselj_complex#  s    	c         C` sA   t  t j t j t d d  t d t j  g d t d d d  S(   Ni8i   i    t   nan_okR/   g-q=(	   R   R'   t   kvR   t   besselkR   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besselk(  s    	!c         C` sA   t  t j t j t d d  t d t j  g d t	 d d d  S(   Ni8i   i    R   R/   g-q=(
   R   R'   t   knR   R   R   R   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besselk_int.  s    	!c         C` s2   t  d   t d    t d d  t   g  d  S(   Nc         S` s   t  j |  j |  S(   N(   R'   R   R9   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   5  s    c         S` s   t  j |  | t  S(   N(   R   R   R   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   6  s    g}Ô%Ig}Ô%IT(   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_besselk_complex4  s    	c         C` sD   d   } t  t j t |  t d d  t d d  g d d d  S(   Nc         S` so   t  t j |  | t   } t |  d k rF t j t j |  } n  t |  d k rk | d k rk t j S| S(   NgقnQ:Bi    (	   R1   R   t   besselyR   Ri   R   R   t   signt   nan(   R:   R6   R+   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   mpbessely:  s    g}Ô%Ig}Ô%ITg    חg    חAR5   i  (   R   R'   t   yvR   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_bessely9  s
    				c         C` s8   d   } t  d   t |  t   t   g d d d  S(   Nc         S` sq   t  t j |  | t   } t |  d k rm t j d d  } z t j t j |  } Wd  t j |   Xn  | S(   NgقnQ:BRU   RV   (	   R#   R   R  R   Ri   R   RW   R   R  (   R:   R6   R+   RX   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR  I  s    c         S` s   t  j |  j |  S(   N(   R'   R  R9   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   S  s    R5   i:  (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_bessely_complexH  s
    	
		c         C` s>   d   } t  d   t |  t d d  t d d  g  d  S(   Nc         S` sA   t  t j |  |   } t |  d k r= | d k r= t j S| S(   Ni    (   R1   R   R  Ri   R   R  (   R:   R6   R+   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR  Y  s    c         S` s   t  j t |   |  S(   N(   R'   t   ynR   (   R:   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   _  s    ii  g    חg    חA(   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_bessely_intX  s    			c      
   ` s~   g    t    f d   t t j  f d   t   t   g d d d t t t j  t j    d d d t d d d  S(   Nc         ` s   |  d k  s | d k  r t  j S|  d k  s7 | d k  r t t |  |   d d k r | r   j t |   t |  f  t  j Sn  t j |  |  S(   Ng   mi    i   (   R   R  Ri   R1   R"   R   R   (   RP   RQ   t   nonzero(   t
   bad_points(    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR   f  s    8
c         ` s     |  | d t  S(   NR  (   RL   (   RP   RQ   (   R   (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   v  s    Rr   i  R_   R   gdy=(   Rw   R   R'   R   R   RL   R   R%   (   R   (    (   R  R   s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR   c  s    		c         C` s;   t  t j t   t d     t   t   t   g  d  S(   Nc         S` s   t  j |  | d | d t S(   Ni    R   (   R   t   betaincRL   (   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R'   R  R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_betainc  s    	c         ` sr   g    t    f d   t t j  f d   t   t   g d d t t j  t j    d d d d d  S(   Nc         ` s   t  |  d t  |   d k r' t j S|  | k  r t  t |  |  t j t |  |    d k  r | r   j t |   t |  f  t j Sn  t j |  |  S(   Ng    חAi   gV瞯<(   Ri   R   R  R1   RJ   R"   R   t   binomial(   R5   t   kR  (   R  (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s     ?
c         ` s     |  | d t  S(   NR  (   RL   (   R5   R  (   R  (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    Rr   i  R   g+=(   Rw   R   R'   t   binomR   R   R%   (   R   (    (   R  R  s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt
   test_binom  s    		c         C` s2   t  d   t d    t   t   g d d d  S(   Nc         S` s   t  j t |   |  S(   N(   R'   t   eval_chebytR   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  | t  S(   N(   R   t   chebytR   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    Rr   i2   (   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_chebyt_int  s    	t   runt   reasons'   some cases in hyp2f1 not fully accuratec         C` s2   t  t j d   t d d  t   g d d d  S(   Nc         S` s"   t    t t j   |  | t  S(   N(   R   R   R   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    iie   R5   i'  (   R   R'   R  R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_chebyt  s    	c         C` s2   t  d   t d    t   t   g d d d  S(   Nc         S` s   t  j t |   |  S(   N(   R'   t   eval_chebyuR   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  | t  S(   N(   R   t   chebyuR   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    Rr   i2   (   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_chebyu_int  s    	c         C` s,   t  t j d   t d d  t   g  d  S(   Nc         S` s"   t    t t j   |  | t  S(   N(   R   R   R   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    iie   (   R   R'   R  R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_chebyu  s    	c         C` sK   d   } t  | t j t   g  t  | t j t d d d g  g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   t   shichi(   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   chi  s    iX   g&.>gU@g   V@(   R   R   R  R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_chi  s    	c         C` sK   d   } t  | t j t t t j d  t t j d   g d d d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R  (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s    g    חg    חAR/   g-q=(   R   R   R  R   R#   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_chi_complex  s
    	+c         C` s,   d   } t  | t j t d d  g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   t   sici(   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   ci  s    g    חg    חA(   R   R   R"  R   (   R   R"  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ci  s    	c         C` sK   d   } t  | t j t t d t j  t d t j   g d d d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   R!  (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR"    s    g    חg    חAR/   g:0yE>(   R   R   R"  R   R#   R   R   (   R   R"  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ci_complex  s
    	+c         C` s;   t  j t  j } t t t j t   g d t	 d | d  S(   NR   R/   (
   R   R   R1   R   R   R   R   R   R   Rw   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt
   test_cospi  s    c         C` s)   t  t t j t   g d t d d d  S(   NR   R/   gvIh%<=(   R   R   R   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_cospi_complex  s    c         C` s2   t  t j t t j  t   g d d d d d  S(   NR/   g-q=Rr   i2   (   R   R'   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_digamma  s    	c      
   C` sA   d   } t  t j t t j  t   g d d d d d | d  S(   Nc         S` s2   t  j |  j d k  t  j |  j  d k  @t t  S(   Ni    gQ?(   R   t   whereR9   Ri   R   Rw   RL   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   param_filter  s    R/   gvIh%<=Rr   i(   R)  (   R   R'   R   R   R   R   (   R   R)  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_digamma_complex  s
    		c         C` s&   t  t j t j t   g d d d  S(   NR/   g+=(   R   R'   t   exp1R   t   e1R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_e1  s    	c         C` s   t  t j t j t t t j d  t t j d   g d d t  t j t j t j	 d d d  d  d   d  f t j d t j d	 d
 d  t j d	 d
 d  f d j   d d t  t j t j t j	 d d d  d d d d  S(   Ng    חg    חAR/   gdy=ii2   i   i    ii   i=   i   y              ?ii'  y                (   R   R'   R+  R   R,  R   R#   R   R   R    R   Ru   R   Rv   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_e1_complex  s    	+	"%	c      
   C` s   t  t j d   t d t j t j t j  j  d t j t j t j  j   g  t  t j d   t j	 d d d d d	 t j
 g  d
 d t t j t j t j
    t t j t j
  d k  d  S(   Nc         S` s*   |  d k r t  j |   |  St  j d  S(   Ni    s   1.0(   R   t   expm1t   mpf(   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    RP   RQ   c         S` s*   |  d k r t  j |   |  St  j d  S(   Ni    s   1.0(   R   R/  R0  (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g-q=gW:i    g   mBgyCxDR/   gdy=(   R   R'   t   exprelR   R   R   R   t   doubleRj   R%   R   R   t   isinf(   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_exprel  s    	J	+c         C` s?   t  t j t j t t t j d  t t j d   g  d  S(   Ng    cg    cA(   R   R'   R/  R   R   R#   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_expm1_complex  s    	c         C` s&   t  t j d   t   g d d d  S(   Nc         S` s   t  j |  d  S(   Ni   (   R   R   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;      s    Rr   i<   (   R   R'   t   log1pR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_log1p_complex  s    	c         C` s)   t  t d   t   g d d d d d  S(   Nc         S` s   t  j |  d  |  S(   Ni   (   R   R   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   %  s    Rr   i<   R/   g+=(   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_log1pmx#  s    c         C` s&   t  t j t j t   g d d d  S(   NR/   gdy=(   R   R'   R(   R   R$   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ei(  s    	c         C` sE   t  t j t j t t t j d  t t j d   g d d d  S(   Ng    חg    חAR/   g&.>(	   R   R'   R(   R   R$   R   R#   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ei_complex.  s    	+c         C` s&   t  t j t j t d d  g  d  S(   NRQ   g      ?(   R   R'   t   ellipeR   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipe5  s    	c         C` s2   t  t j t j t d d  t d d  g  d  S(   Ng     @g     @@RQ   g      ?(   R   R'   t	   ellipeincR   R;  R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipeinc:  s    	c         C` s&   t  t j t j t   t   g  d  S(   N(   R   R'   R=  R   R;  R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipeinc_largephi?  s    	c         C` s,   t  t j t j t d d  t   g  d  S(   Ng     @g     @@(   R   R'   t	   ellipkincR   t   ellipfR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipfD  s    	c         C` s&   t  t j t j t   t   g  d  S(   N(   R   R'   R@  R   RA  R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipf_largephiI  s    	c         C` sN   t  t j t j t d d  g  t  t j d   t d d  g d d d  S(   NRQ   g      ?c         S` s   t  j d |   S(   Ni   (   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   S  s    RP   g        Rr   i  (   R   R'   R   R   R   t   ellipkm1(   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipkN  s    		c         C` s>   d   } t  t j | t d d  t d d  g d t d  S(   Nc         S` s   t  j d |  |  S(   Ni    (   R   t   ellippi(   t   phiR   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR@  X  s    g     @g     @@RQ   g      ?R_   (   R   R'   R@  R   RL   (   R   R@  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipkincW  s
    		c         C` s8   d   } t  t j | t   t d d  g d t d  S(   Nc         S` s   t  j d |  |  S(   Ni    (   R   RF  (   RG  R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR@  `  s    RQ   g      ?R_   (   R   R'   R@  R   RL   (   R   R@  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipkinc_largephi_  s
    		c      	   C` sD   d   } t  d   | t d d  t d d d d  g d	 d
 d  S(   Nc         S` s-   |  d k r d St  j d d |  d | Sd  S(   Ni    t   snR   R   (   R   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyRJ  h  s    c         S` s   t  j |  |  d S(   Ni    (   R'   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   r  s    g    .g    .ARP   i    RQ   i   R/   g:0yE>(   R   R   (   R   RJ  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipfun_sng  s
    	
	$c      	   C` s>   t  d   d   t d d  t d d d d  g d	 d
 d  S(   Nc         S` s   t  j |  |  d S(   Ni   (   R'   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   y  s    c         S` s   t  j d d |  d | S(   Nt   cnR   R   (   R   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   z  s    g    .g    .ARP   i    RQ   i   R/   g:0yE>(   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipfun_cnw  s    	$c      	   C` s>   t  d   d   t d d  t d d d d  g d	 d
 d  S(   Nc         S` s   t  j |  |  d S(   Ni   (   R'   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j d d |  d | S(   NR   R   R   (   R   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    g    .g    .ARP   i    RQ   i   R/   g:0yE>(   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ellipfun_dn~  s    	$c         C` s    t  t j d   t   g  d  S(   Nc         S` s   t  j |   S(   N(   R   Rn   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R'   Rn   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_erf  s    	c         C` s&   t  t j d   t   g d d d  S(   Nc         S` s   t  j |   S(   N(   R   Rn   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i   (   R   R'   Rn   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR     s    	c         C` s,   t  t j t d    t   g d d d  S(   Nc         S` s   t  j |   S(   N(   R   Rp   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R/   gvIh%<=(   R   R'   Rp   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_erfc  s    	c         C` s,   t  t j t d    t   g d d d  S(   Nc         S` s   t  j |   S(   N(   R   Rp   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i   (   R   R'   Rp   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_erfc_complex  s    	c         C` s&   t  t j t j t   g d d d  S(   NR5   i   (   R   R'   t   erfiR   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_erfi  s    	c         C` s&   t  t j t j t   g d d d  S(   NR5   i   (   R   R'   RR  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_erfi_complex  s    	c         C` s,   t  t j t d    t   g d d d  S(   Nc         S` s   t  j |   S(   N(   R   t   ncdf(   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i   (   R   R'   t   ndtrR   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_ndtr  s    	c      
   C` sD   t  t j d   t d t d d  d t d d   g d d d  S(   Nc         S` s   t  j |  t j d   d S(   Ng       @(   R   Rp   R   t   sqrt(   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    RP   iRQ   i'  R5   i  (   R   R'   RV  R   R#   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ndtr_complex  s    	c         C` s2   t  t j t d    t   g d d d d d  S(   Nc         S` s   t  j t  j |    S(   N(   R   R   RU  (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   iX  Rr   i,  (   R   R'   t   log_ndtrR   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_log_ndtr  s    	c      
   C` sP   t  t j t d    t d t d d  d t d d   g d d	 d
 d d  S(   Nc         S` s(   t  j t  j |  t j d   d  S(   Ng       @(   R   R   Rp   R   RX  (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    RP   iiRQ   i'  id   R5   i   Rr   i,  (   R   R'   RZ  R   R   R#   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_log_ndtr_complex  s    	c         C` s,   t  d   t j t d d  g d d d  S(   Nc         S` s   t  j |   d S(   Ni(   R'   t   euler(   R5   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i   i'  R5   (   R   R   t   eulernumR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_eulernum  s    	c         C` sA   t  t j t j t d d  t d t j  g d d d d d  S(   Ni    i   R/   gvIh%<=Rr   i   (	   R   R'   R4   R   R2   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_expint  s    	!c         C` s&   d   } t  | t j t   g  d  S(   Nc         S` s   t  j |   d S(   Ni    (   R'   t   fresnel(   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   fresnels  s    (   R   R   Rb  R   (   R   Rb  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_fresnels  s    	c         C` s&   d   } t  | t j t   g  d  S(   Nc         S` s   t  j |   d S(   Ni   (   R'   Ra  (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   fresnelc  s    (   R   R   Rd  R   (   R   Rd  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_fresnelc  s    	c         C` s&   t  t j t t j  t   g  d  S(   N(   R   R'   t   gammaR   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt
   test_gamma  s    	c         C` s,   t  t j t t j  t   g d d d  S(   NR/   g-a=(   R   R'   Rf  R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gamma_complex  s    	c         C` sD   t  t j d   t d d d t t d d  g d t d d d  S(   Nc         S` s   t  j |  d | d t S(   NRQ   R   (   R   R   RL   (   R-   RQ   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    g     @t   inclusive_aR   R/   gdy=(   R   R'   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gammainc  s    	$c         C` sD   t  t j d   t d d d t t d d  g d t d d d  S(   Nc         S` s   t  j |  d | d t S(   NRP   R   (   R   R   RL   (   R-   RP   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    g     @Ri  R   R/   gdy=(   R   R'   t	   gammainccR   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gammaincc  s    	$c         C` s,   d   } t  t j t |  t   g  d  S(   Nc         S` s   t  j |   j S(   N(   R   R   R9   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   f  s    (   R   R'   t   gammalnR   R   (   R   Rm  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gammaln  s    	c         C` s8   t  t j t t j  t d d  t   t   g  d  S(   Ng     @g     @@(   R   R'   t   eval_gegenbauerR   R   t
   gegenbauerR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gegenbauer  s    	c         C` s   d   } d   } t  | t |  t d d  t d d  t   g d d d	 d d
 t d d t  | t |  t d d  t   t t j d d d   g d	 d d
 t d  S(   Nc         S` s  t  |  d k r t j S|  d k r. d } n2 |  d k rK d | | } n t j |  | |  } t |  d k r | d k  r t |  t t |   k r t j |  | t j d  |  } t  |  t j d  k  r t j d  } q n  t  |  d	 k rt j S| S(
   Ng}Ô%ITi    g      ?i   i   is   1e-50s   0.0g\4@Iw(	   Ri   R   R  R   Rq  R1   R   R0  R   (   R5   RP   R6   R+   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyRq    s    	<"c         S` s8   t  j t |   | |  } t |  d k r4 t j S| S(   Ng\4@Iw(   R'   Rp  R   Ri   R   R   (   R5   RP   R6   R+   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   sc_gegenbauer  s    i    id   g    eg    eAR5   i@  Rr   R_   R/   gư>iii   (   R   R   R   R   RL   R   R   R   (   R   Rq  Rs  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gegenbauer_int  s    			$	0c         C` s8   t  d   t t j  t d d  t   t   g  d  S(   Nc         S` s   t  j t |   | j |  S(   N(   R'   Rp  R   R9   (   R5   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   (  s    i    id   (   R   R   R   Rq  R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gegenbauer_complex&  s    	c         C` s8   t  d   t t j  t d d  t   t   g  d  S(   Nc         S` s   t  j |  j | j |  S(   N(   R'   Rp  R9   (   R5   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   .  s    g     @g     @@(   R   R   R   Rq  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_gegenbauer_complex_general,  s    	c         C` s2   t  t j t d    t d d  t   g  d  S(   Nc         S` s   t  j |  | t  S(   N(   R   t   hankel1R   (   R:   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   4  s   g@xg@xD(   R   R'   Rw  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hankel12  s    	c         C` s2   t  t j t d    t d d  t   g  d  S(   Nc         S` s   t  j |  | t  S(   N(   R   t   hankel2R   (   R:   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   :  s    g@xg@xD(   R   R'   Ry  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hankel28  s    	s%   issues at intermediately large ordersc         C` s2   t  d   t t j  t d d  t   g  d  S(   Nc         S` s   t  j t |   |  S(   N(   R'   t   eval_hermiteR   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   ?  s    i    i'  (   R   R   R   t   hermiteR   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hermite=  s    	c         ` sS   t  d d d d    t t j   f d   t d d  t d d	  g d
 d d  S(   NR   i  R   i  c         ` s   t  j |  |    S(   N(   R   R8   (   RP   R6   (   t   KW(    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   J  s    g    cg    cAi    g     j@R5   i  (   RK   R   R'   R8   R   (   R   (    (   R~  s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp0f1E  s
    	c      	   C` sJ   t  d   t d    t d d  t t d d  t d d   g  d  S(   Nc         S` s   t  j |  j |  S(   N(   R'   R8   R9   (   RP   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   S  s    c         S` s   t  j |  | t  S(   N(   R   R8   R   (   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   T  s    ii
   iix   (   R   R   R   R   R#   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp0f1_complexR  s    	c         C` sJ   t  t t j  t d    t d d  t d d  t   g d d d  S(   Nc         S` s   t  j |  | | t  S(   N(   R   t   hyp1f1R   (   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   ]  s    g     jg     j@R5   i  (   R   R   R'   R  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp1f1Z  s    $c         C` sJ   t  t d    t d    t d d  t d d  t   g d d d  S(   Nc         S` s   t  j |  j | j |  S(   N(   R'   R  R9   (   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   c  s    c         S` s   t  j |  | | t  S(   N(   R   R  R   (   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   d  s    g     @g     @@R5   i  (   R   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp1f1_complexa  s    $c         C` sP   t  d   t d    t d d  t d d  t d d  t   g d d d  S(   Nc         S` s   t  j |  j | j | j |  S(   N(   R'   RM   R9   (   RP   RQ   RR   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   k  s    c         S` s   t  j |  | | | t  S(   N(   R   RM   R   (   RP   RQ   RR   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   l  s    g      Yg      Y@R5   i
   (   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyp2f1_complexh  s    	0c         C` s2   t  t j t d    t   t   t   g  d  S(   Nc         S` s   t  j |  | | t  S(   N(   R   t   hyperuR   (   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   s  s    (   R   R'   R  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_hyperup  s    	t	   conditions:   mpmath issue gh-342: unsupported operand mpz, long for powc         C` sA   d   } t  t | t d d d t t d d  g d d d  S(   Nc         S` s+   t  j | |   t  j |  t  j |   S(   N(   R   t   powerR!   Rf  (   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mp_igam_facy  s    i    g  ļBRi  R/   g|=(   R   R   R   Rw   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_igam_facv  s
    	$c         C` sN   t  t j t j t d d  g  t  t j t j t d d  g d d d  S(   Ng     @g     @@g    חg    חAR/   gh㈵>(   R   R'   t   j0R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_j0  s    		c         C` sN   t  t j t j t d d  g  t  t j t j t d d  g d d d  S(   Ng     @g     @@g    חg    חAR/   gh㈵>(   R   R'   t   j1R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_j1  s    		c         C` sl   t  t j t d    t   t   t   t   g  t  d   t d    t   t   t   t   g  d  S(   Nc         S` s   t  j |  | | | t  S(   N(   R   t   jacobiR   (   RP   RQ   RR   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j t |   | | |  S(   N(   R'   t   eval_jacobiR   (   R5   RQ   RR   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  | | | t  S(   N(   R   R  R   (   RP   RQ   RR   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R'   R  R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_jacobi  s    		c         ` sM   d     t  d     f d   t   t   t   t   g d d d d d  S(   Nc         S` s&   |  d k r d St  j |  | | |  S(   Ni    g      ?(   R   R  (   R5   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s    c         S` s   t  j t |   | | |  S(   N(   R'   R  R   (   R5   RP   RQ   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         ` s   t     |  | | | t  S(   N(   R   R   (   R5   RP   RQ   R6   (   R  (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i N  Rr   i2   (   R   R   R   (   R   (    (   R  s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_jacobi_int  s
    		c         C` s2   d   } t  t j | t d d  g d d d  S(   Nc         S` s.   |  d k r t  d St t j  d |  t  S(   Ni    i   (   R   R   R   t   keiR   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s    	gꌠ9Y>)gꌠ9Y>)FR5   i  (   R   R'   R  R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_kei  s    		c         C` s2   t  t j t d    t d d  g d d d  S(   Nc         S` s   t  j d |  t  S(   Ni    (   R   t   kerR   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    gꌠ9Y>)gꌠ9Y>)FR5   i  (   R   R'   R  R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_ker  s    	c         C` s,   t  t t j  d   t   t   g  d  S(   Nc         S` s   t  t j  |  | t  S(   N(   R   R   t   laguerreR   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R   R'   t   eval_laguerreR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_laguerre  s    c         C` s,   t  d   d   t   t   g d d d  S(   Nc         S` s   t  j t |   |  S(   N(   R'   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  t j  |  | t  S(   N(   R   R   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i N  (   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_laguerre_int  s    	s   see gh-3551 for bad pointsc         C` sE   t  d   d   t t j t j  t d d  g d d d t d  S(   Nc         S` s   t  j |  t | j   S(   N(   R'   R   R   R9   (   R6   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  j |  t | j   S(   N(   R   R   R   R9   (   R6   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i
   R/   gvIh%<=R   (   R   R   R   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_lambertw_real  s    	%c         ` s\   d } t  j d    d     f d   } t | t j t d | d t g d d d  S(	   NgGase@i   g  E@c         ` s   t  j d d  y |   d   |  d } | t  j k rO | t |   } n8 |   d   d |  d } | t |   } | | 9} Wd  QX| S(   Nt   overRV   g      ?(   R   t   errstateR   R   (   R6   t   facR>   (   t   et   g(    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyRf    s    i    Ri  R/   gvIh%<=(   R   R!   R   R   Rf  R   Rw   (   R   t   maxgammaRf  (    (   R  R  s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_lanczos_sum_expg_scaled  s    c         C` s&   t  t j t j t   t   g  d  S(   N(   R   R'   t   eval_legendreR   t   legendreR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legendre  s    	c      	   C` s`   t  d   d   t   t   g d d t  d   d   t   t t j d d d	   g  d  S(
   Nc         S` s   t  j t |   |  S(   N(   R'   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  t j  |  | t  S(   N(   R   R   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i N  c         S` s   t  j t |   |  S(   N(   R'   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    c         S` s   t  t j  |  | t  S(   N(   R   R   R  R   (   R5   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    iii   (   R   R   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legendre_int  s    		c         C` s   d   } d   } d   } t  | | t d d  t d d  t   g  t  | | t d d  t d d  t d d  g d d	 d  S(
   Nc         S` sk   y! t  j | |  |  d d } Wn t k
 r8 t j SXt |  d k rg t j t j | j  } n  | S(   Ni    ig)#v(   ii(	   R'   t   lpmnt
   ValueErrorR   R  Ri   R   R  R9   (   R5   R   R-   R:   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   lpnm  s    !c         S` sG   t  j | |  |  } t |  d k rC t j t j | j  } n  | S(   Ng)#v(   R'   R   Ri   R   R   R  R9   (   R5   R   R-   R:   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   lpnm_2   s    c         S` s   | d k s | d k rp t  |   |  k rp | d k ri |  d k  rP |  d }  n  t j t j |  |   Sd Sn  t |  d k  r t j St |  d k  r d n d } t t j  |  | | d | } t |  d k r t j	 t j | j
  } n  | S(	   Ni   ii    gV瞯<i   i   t   typeg)#v(   R   R   R  R  Ri   R   R  R   R   R   R9   (   R5   R   R-   t   typR:   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR     s    *!iid   ii   R   g|=(   R   R   R   (   R   R  R  R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legenp  s    	
		%*c         C` s   d   } d   } t  j d d d d d d d	 d
 d g	  } t  j d d d d g  } | d  d   d  f d | d  d  d   f j   } t | | t d d d d d d g  t d d d d d d g  t |  g d d d d d  S(   Nc         S` sG   y+ t  j | j |  j | d d d d SWn t k
 rB t j SXd  S(   NR  i   i    i(   ii(   R'   t   clpmnR9   R  R   R  (   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   clpnm)  s    +c         S` sJ   t  |  d k  r t j St t j  t |  j  t | j  | d d S(   NgV瞯<R  i   (   Ri   R   R  R   R   R   R   R9   (   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR   /  s    igGzg      i    gh㈵>g      ?gGz?i   g     @@g     @g?y              ?ii   i   i
   R/   gư>R5   i  (   R   R%   R   Rv   R   R   (   R   R  R   R6   R=   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legenp_complex_2(  s    		*4Ec         C` s   d   } d   } t  j d d d d d d d	 d
 d g	  } t  j d d d d g  } | d  d   d  f d | d  d  d   f j   } t | | t d d d d d d g  t d d d d d d g  t |  g d d d d d  S(   Nc         S` sG   y+ t  j | j |  j | d d d d SWn t k
 rB t j SXd  S(   NR  i   i    i(   ii(   R'   R  R9   R  R   R  (   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR  A  s    +c         S` sJ   t  |  d k  r t j St t j  t |  j  t | j  | d d S(   NgV瞯<R  i   (   Ri   R   R  R   R   R   R   R9   (   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR   G  s    igGzg      i    gh㈵>g      ?gGz?i   g     @@g     @g?y              ?ii   i   i
   R/   gư>R5   i  (   R   R%   R   Rv   R   R   (   R   R  R   R6   R=   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legenp_complex_3@  s    		*4Es*   apparently picks wrong function at |z| > 1c         C` sD   d   } d   } t  | | t d d  t d d  t   g  d  S(   Nc         S` s   t  j | |  |  d d S(   Ni    i(   ii(   R'   t   lqmn(   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   lqnmZ  s    c         S` s8   t  |  d k  r t j St t j  |  | | d d S(   NgV瞯<R  i   (   Ri   R   R  R   R   t   legenq(   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR  ]  s    i    id   (   R   R   R   (   R   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legenqX  s
    		c         C` sJ   d   } d   } t  | | t d d  t d d  t   g d d d  S(   Nc         S` s-   t  j t | j  t |  j  |  d d S(   Ni    i(   ii(   R'   R  R   R9   (   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR  i  s    c         S` sJ   t  |  d k  r t j St t j  t |  j  t | j  | d d S(   NgV瞯<R  i   (   Ri   R   R  R   R   R  R   R9   (   R5   R   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR  l  s    i    id   R5   (   R   R   R   (   R   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_legenq_complexg  s    		$c      
   C` s>   d   } d   } t  t | t   g d d d d d | d  S(   Nc         S` s,   t  j t  j |   |  k |  d k @t t  S(   Ni    (   R   R(  t   floorRw   RL   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR)  x  s    c         S` s   t  j d |   j S(   Ni   (   R   R   R9   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   mp_lgam1p|  s    R/   gvIh%<=Rr   id   R)  (   R   R   R   (   R   R)  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_lgam1pw  s    		c      
   C` s8   d   } t  t j | t   g d t d t d d d  S(   Nc         S` s@   y t  j |   } Wn& t k
 r; t t j t j  } n X| S(   N(   R   R   R  R#   R   R  (   R-   R>   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mpmath_loggamma  s
    R   t   distinguish_nan_and_infR/   gvIh%,=(   R   R'   R   R   Rw   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_loggamma  s
    		c         C` s2   d   } t  | t d    t   t   g  d  S(   Nc         S` s   t  j |  |  d S(   Ni    (   R'   t   pbdv(   R:   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   pcfd  s    c         S` s   t  j |  | t  S(   N(   R   R  R   (   R:   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    (   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_pcfd  s    	sH   it's not the same as the mpmath function --- maybe different definition?c         C` s2   d   } t  | d   t   t   g d d d  S(   Nc         S` s   t  j |  |  d S(   Ni    (   R'   t   pbvv(   R:   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   pcfv  s    c         S` s"   t    t t j   |  | t  S(   N(   R   R   R   R  R   (   R:   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    R5   i  (   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_pcfv  s    	c         C` s   d   } d   } d   } t  | t j t d d  t d d  g d d d d	 t  | | t d d  t d d  g d d
 d d	 d  S(   Nc         S` s   t  j |  |  d S(   Ni    (   R'   t   pbwa(   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   pcfw  s    c         S` s   t  j |  |  d S(   Ni   (   R'   R  (   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   dpcfw  s    c         S` s   t  j t  j |  | f d  S(   Ni    i   (   i    i   (   R   t   diffR  (   RP   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mpmath_dpcfw  s    ii   R/   g:0yU>R5   id   g&.!>(   R   R   R  R   (   R   R  R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_pcfw  s    			+sC   issues at large arguments (atol OK, rtol not) and <eps-close to z=0c         C` s;   t  t j t   t t j   t d d  t   g  d  S(   Ni    i  (   R   R'   t	   polygammaR   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_polygamma  s    	c         C` s2   d   } t  t j | t   g d d d t d  S(   Nc         S` s&   |  d k  r t  j St j |   } | S(   Ni(   R   R   R   R   (   R6   R:   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR     s    R5   i  R_   (   R   R'   R   R   RL   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_rgamma  s    		c         C` s,   t  t j t t j  t   g d d d  S(   NR/   g-a=(   R   R'   R   R   R   R   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_rgamma_complex  s    	sN   see gh-3551 for bad points on 32 bit systems and gh-8095 for another bad pointc         C` sY   t  t j  t  d  k r' t j } n	 d   } t t j | t   t   g d d d  S(   Ns   1.0.0c         S` sl   t  |  |  t |  |  k r\ t  |  |  d k r\ t j |   }  t |  |  |  } n  t j |  |  S(   Ni    (   R1   R   R   R0  t   rf(   RP   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mppoch  s    6Rr   i  (   R   R   Rh   R  R   R'   t   pochR   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_rf  s    			c         C` s;   t  j t  j } t t t j t   g d t	 d | d  S(   NR   R/   (
   R   R   R1   R   R   R   R   R   R   Rw   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt
   test_sinpi  s    c         C` s)   t  t t j t   g d t d d d  S(   NR   R/   g+=(   R   R   R   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_sinpi_complex  s    c         C` sK   d   } t  | t j t   g  t  | t j t d d d g  g  d  S(   Nc         S` s   t  j |   d S(   Ni    (   R'   R  (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   shi  s    iX   g&.>gU@g   V@(   R   R   R  R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_shi  s    	c         C` sK   d   } t  | t j t t t j d  t t j d   g d d d  S(   Nc         S` s   t  j |   d S(   Ni    (   R'   R  (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s    g    חg    חAR/   g-q=(   R   R   R  R   R#   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_shi_complex  s
    	+c         C` s&   d   } t  | t j t   g  d  S(   Nc         S` s   t  j |   d S(   Ni    (   R'   R!  (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   si  s    (   R   R   R  R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_si  s    	c         C` sK   d   } t  | t j t t d t j  t d t j   g d d d  S(   Nc         S` s   t  j |   d S(   Ni    (   R'   R!  (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s    g    חg    חAR/   g-q=(   R   R   R  R   R#   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_si_complex  s
    	+c         C` s;   d   } t  t j t |  t d t j  g d d d  S(   Nc         S` s   t  j d d |   S(   Ni   i   (   R   R   (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   dilog  s    i    R/   g+=(   R   R'   R   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spence  s    			c         C` s2   d   } t  t j t |  t   g d d d  S(   Nc         S` s   t  j d d |   S(   Ni   i   (   R   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s    R/   g+=(   R   R'   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spence_complex  s    			c         C` sr   d   } t  | t j t d d  t d d  t d d d t  t d d d d t  g d d d	 d
 d d d  S(   Nc         S` s)   | |  k r t  j St j | |  | |  S(   N(   R   R  R'   t   sph_harm(   t   lR   R   RG  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   spherharm  s    i    id   RP   RQ   i   R   g:0yE>R5   ip  Rr   i   (   R   R   R  R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherharm  s    	.c         C` s>   t  t j t t j  t d d  t d d  g d d d  S(   Ng     g     @i    R/   g&.>(   R   R'   t   struveR   R   t   struvehR   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_struveh(  s    	c         C` sJ   d   } t  t j t |  t d d  t d d  g d d d t d  S(   Nc         S` sz   |  d k  rj | |  k  rj t  |   d k rj t j j } z  d t j _ t j |  |  SWd  | t j _ Xn  t j |  |  S(   Ni    i  i,  (   Ri   R   Rq   Rr   t   struvel(   R:   R-   Rx   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt
   mp_struvel/  s    +g     g     @i    R/   g&.>R_   (   R   R'   t	   modstruveR   R   RL   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_struvel.  s    			c         C` s,   t  t j d   t   g d d d t d  S(   Nc         S` s   t  |  d  S(   Ni   (   R   (   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   B  s    R/   g+=R   (   R   R'   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_wrightomega@  s    	c      
   C` sJ   t  t j t t j  t d d d d d t  t d d d t  g  d  S(   NRP   i   RQ   g    _BRi  i    (   R   R'   t   zetaR   R   R   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   test_zetaE  s    	c      
   C` s8   t  t j d   t d d  g d t d d d d d  S(	   Nc         S` s   t  j |   d S(   Ni   (   R   R  (   R6   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   M  s    iid   R   Rr   i-   R/   gvIh%<=(   R   R'   t   zetacR   Rw   (   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt
   test_zetacK  s    	c      
   C` sP   d   } t  t j t |  t d d d t  t   g d d d d d	 d
 d  S(   Nc         S` s[   t  j j |   }  t  j j |  } | d k r@ t  j j |   St  j j |  |  | Sd  S(   Ni    (   R   Rq   R0  R   t   powm1(   R6   t   lmbda(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt	   mp_boxcoxS  s
    RP   i    Ri  R5   i   Rr   i<   R/   gvIh%<=(   R   R'   t   boxcoxR   R   Rw   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_boxcoxQ  s    			c      
   C` sP   d   } t  t j t |  t d d d t  t   g d d d d d	 d
 d  S(   Nc         S` su   t  j j |   }  t  j j |  } t  j j d  } | d k rV t  j j | |   St  j j | |  |  | Sd  S(   Ni   i    (   R   Rq   R0  R   R  (   R6   R  t   one(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mp_boxcox1pd  s    RP   iRi  R5   i   Rr   i<   R/   gvIh%<=(   R   R'   t   boxcox1pR   R   Rw   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_boxcox1pb  s    				c         C` sD   d   } t  d   t |  t d d  t d d  g d d d  S(	   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   t	   mpmathifyR   R0  RX  R   R   R9   (   R5   R-   t   argt   out(    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mp_spherical_jnu  s     c         S` s   t  j t |   |  S(   N(   R'   t   spherical_jnR   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;   ~  s    i    i   g    חg    חARr   i,  (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_jnt  s
    				c         C` s8   d   } t  d   t |  t d d  t   g  d  S(   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   R  R   R0  RX  R   R   R9   (   R5   R-   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s     c         S` s   t  j t |  j  |  S(   N(   R'   R  R   R9   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_jn_complex  s    				c         C` sD   d   } t  d   t |  t d d  t d d  g d d d  S(	   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   R  R  R0  RX  R   R   R9   (   R5   R-   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mp_spherical_yn  s     c         S` s   t  j t |   |  S(   N(   R'   t   spherical_ynR   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   g    _g    _BRr   id   (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_yn  s
    				c         C` s8   d   } t  d   t |  t d d  t   g  d  S(   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   R  R  R0  RX  R   R   R9   (   R5   R-   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s     c         S` s   t  j t |  j  |  S(   N(   R'   R  R   R9   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_yn_complex  s    				c      	   C` sD   d   } t  d   t |  t d d  t   g d d d d	 d  S(
   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   R  R   R0  RX  R   R   R9   (   R5   R-   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mp_spherical_in  s     c         S` s   t  j t |   |  S(   N(   R'   t   spherical_inR   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   Rr   R   i
   ig訰6(   R   R   R   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_in  s
    				c         C` s8   d   } t  d   t |  t d d  t   g  d  S(   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   R  R   R0  RX  R   R   R9   (   R5   R-   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR     s     c         S` s   t  j t |  j  |  S(   N(   R'   R  R   R9   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   (   R   R   R   R   (   R   R   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_in_complex  s    				c         C` s>   d   } t  d   t |  t d d  t   g d d d  S(   Nc         S` sk   t  j |  t  j d  d |  t  j t  j d t  j |   } t  j |  j d k rc | j S| Sd  S(   Ni   i   i    (   R   R   R0  RX  R   R  R   R9   (   R5   R-   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   mp_spherical_kn  s
     $c         S` s   t  j t |   |  S(   N(   R'   t   spherical_knR   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   Rr   id   (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_kn  s
    			s.   Accuracy issues near z = -1 inherited from kv.c         C` s>   d   } t  d   t |  t d d  t   g d d d  S(   Nc         S` sh   t  j |  } t  j |  t  j d  d |  t  j d | t  j  } | j d k r` | j S| Sd  S(   Ni   i   i    (   R   R  R   R0  RX  R   R   R9   (   R5   R-   R  R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR    s     c         S` s   t  j t |  j  |  S(   N(   R'   R  R   R9   (   R5   R-   (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR;     s    i    i   Rr   (   R   R   R   R   (   R   R  (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   test_spherical_kn_complex  s
    				(   t   __name__t
   __module__R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R  R  R  R
  R   R  R  R  t   pytestt   markt   xfailRw   R  R  R  R  R   R#  R$  R%  R&  R'  R*  R-  R.  R4  R5  R7  R8  R9  R:  R<  R>  R?  RB  RC  RE  RH  RI  RK  RM  RN  RO  R   RP  RQ  RS  RT  RW  RY  R[  R\  R_  R`  Rc  Re  Rg  Rh  Rj  Rl  Ro  Rr  Rt  Ru  R   Rv  Rx  Rz  R}  R  R  R  R  R  R  t   _is_32bit_platformR  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  (    (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyR     s  	
		
		
		
																		$	$													
																																					0		$		
		
			
		$			3		$		$	$																												(S   t   __doc__t
   __future__R    R   R   t   numpyR   t   numpy.testingR   R   R   R
  RH   t   distutils.versionR   t   scipy.specialt   specialR'   t   scipy._lib.sixR   t   scipy.special._testutilsR   R	   R
   R   t   scipy.special._mptestutilsR   R   R   R   R   R   R   R   R   R   t   scipy.special._ufuncsR   R   R   R   R   R   R   t   ImportErrort   intpt   itemsizeR  R.   R7   R?   RD   RT   RY   R^   Ra   R  t   slowRm   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   RK   R   t   objectR   (    (    (    s>   lib/python2.7/site-packages/scipy/special/tests/test_mpmath.pyt   <module>   sv   "F.#;'						