ó
î&]\c           @` sŐ   d  Z  d d l m Z m Z m Z d d l Z d d l m Z yQ e   B Z e j	 e
 d  d d l Z d d l m Z e j d  Z Wd QXWn e k
 r˘ n Xd   Z d	 Z d
   Z e d k rŃ e   n  d S(   sĘ   Precompute the polynomials for the asymptotic expansion of the
generalized exponential integral.

Sources
-------
[1] NIST, Digital Library of Mathematical Functions,
    https://dlmf.nist.gov/8.20#ii

i    (   t   divisiont   print_functiont   absolute_importN(   t   suppress_warningss"   inspect.getargspec.. is deprecated(   t   Polyt   xc         C` sw   t  d t  g } x^ t |   D]P } | j t  d d | t t  | | t  t t d  | | j    q W| S(   Ni   i   (   R   R   t   ranget   appendt   diff(   t   Kt   At   k(    (    sA   lib/python2.7/site-packages/scipy/special/_precompute/expn_asy.pyt
   generate_A   s    Nse   /* This file was automatically generated by _precompute/expn_asy.py.
 * Do not edit it manually!
 */
c          C` s  t  t  t j j d d d  }  d } t |  } t |  d d  ,} | j t  | j d j	 t
 |    xj t |  D]\ \ } } d j g  | j   D] } t | j d	   ^ q  } | j d
 j	 | |   q Wd j g  t | d  D] } d j	 |  ^ q÷  } | j d j	 |   d j g  | D] } t | j    ^ q8 } | j d j	 |   Wd  QXt j |  d |   d  S(   Ns   ..t   cephess   expn.hi   s   .newt   ws   #define nA {}
s   , i   s$   static const double A{}[] = {{{}}};
i   s   A{}s#   static const double *A[] = {{{}}};
s#   static const int Adegs[] = {{{}}};
(   t   printt   __doc__t   ost   patht   joinR   t   opent   writet   WARNINGt   formatt   lent	   enumeratet   coeffst   strt   evalfR   t   degreet   rename(   t   fnR	   R
   t   fR   t   AkR   t   tmp(    (    sA   lib/python2.7/site-packages/scipy/special/_precompute/expn_asy.pyt   main)   s    
75.t   __main__(   R   t
   __future__R    R   R   R   t   scipy._lib._numpy_compatR   t   supt   filtert   DeprecationWarningt   sympyR   t   symbolsR   t   ImportErrorR   R   R#   t   __name__(    (    (    sA   lib/python2.7/site-packages/scipy/special/_precompute/expn_asy.pyt   <module>	   s    		