ó
\K]c           @` s™  d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z
 d d l Z d d l m Z d d l
 m Z d d l m Z d d l m Z g  Z d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e j e j ƒ d e f d „  ƒ  Yƒ Z d e f d „  ƒ  YZ d a  y d d l! Z! e" e! d d ƒ Z# e$ g  e# j% d ƒ D] Z& e' e& ƒ ^ q¢ƒ di k  rßd Z( e	 j) e( ƒ e* ‚ n  e j+ j, d d ƒ rýe* ‚ n  Wn0 e* k
 r0d e f d „  ƒ  YZ- d „  Z. n¡Xd d  l! m/ Z/ m0 Z0 m1 Z1 m2 Z2 m3 Z3 d! e f d" „  ƒ  YZ4 d# e f d$ „  ƒ  YZ5 i  Z6 i d d% 6d d& 6d d' 6d d( 6d d) 6e6 d* <i e2 j7 d% 6e2 j8 d& 6e2 j9 d' 6e2 j: d( 6e2 j; d) 6e6 d+ <i e2 j7 d% 6e2 j< d& 6e2 j= d' 6e2 j< d( 6e2 j; d) 6e6 d, <i e2 j9 d% 6e2 j8 d& 6e2 j= d' 6e2 j> d( 6e2 j; d) 6e6 d- <i e2 j< d% 6e2 j< d& 6e2 j: d' 6e2 j> d( 6e2 j; d) 6e6 d. <e6 d* Z? d/ e f d0 „  ƒ  YZ@ d1 „  Z. d2 ZA d3 ZB d4 ZC d5 eA ZD d6 ZE d7 e
 jF eA f ZG eH ƒ  ZI eB eI d8 <eE eI d9 <eG eI d: <eC eI d; <eD eI d< <d= „  ZJ d> e f d? „  ƒ  YZK d@ eL f dA „  ƒ  YZM dB eM f dC „  ƒ  YZN dD eM f dE „  ƒ  YZO dF eO f dG „  ƒ  YZP dH eO f dI „  ƒ  YZQ dJ eO f dK „  ƒ  YZR dL eM f dM „  ƒ  YZS dN eM f dO „  ƒ  YZT dP eM f dQ „  ƒ  YZU dR eM f dS „  ƒ  YZV dT eU f dU „  ƒ  YZW dV eM f dW „  ƒ  YZX dX eX f dY „  ƒ  YZY dZ eM f d[ „  ƒ  YZZ d\ eM f d] „  ƒ  YZ[ d^ eM f d_ „  ƒ  YZ\ d` eM f da „  ƒ  YZ] db eX f dc „  ƒ  YZ^ dd eX f de „  ƒ  YZ_ df „  Z` e ja jb ec ƒ Zd i  Ze e jf dg „  ƒ Zg e g  eh ƒ  ji ƒ  D]F \ Zj Zk ej jl dh ƒ rHem ek en ƒ rHeo ek eL e f ƒ rHej ^ qH7Z d S(j   s%   
Numba-specific errors and warnings.
i    (   t   print_functiont   divisiont   absolute_importN(   t   defaultdict(   t   six(   t   wraps(   t   abstractmethodt   NumbaWarningc           B` s   e  Z d  Z d e d „ Z RS(   s8   
    Base category for all Numba compiler warnings.
    c         C` sŒ   | |  _  | |  _ | r' t ƒ  j } n	 d „  } | re t t |  ƒ j | d | | j ƒ  f ƒ ƒ n# t t |  ƒ j | d | f ƒ ƒ d  S(   Nc         S` s   |  S(   N(    (   t   x(    (    s+   lib/python2.7/site-packages/numba/errors.pyt	   highlight"   s    s   %s
%s
s   %s(   t   msgt   loct	   termcolort   errmsgt   superR   t   __init__t	   strformat(   t   selfR
   R   t   highlightingR	   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR      s    			 N(   t   __name__t
   __module__t   __doc__t   Nonet   TrueR   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR      s   t   NumbaPerformanceWarningc           B` s   e  Z d  Z RS(   sV   
    Warning category for when an operation might not be
    as fast as expected.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   +   s   t   NumbaDeprecationWarningc           B` s   e  Z d  Z RS(   s;   
    Warning category for use of a deprecated feature.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   2   s   t   NumbaPendingDeprecationWarningc           B` s   e  Z d  Z RS(   sL   
    Warning category for use of a feature that is pending deprecation.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   8   s   t   NumbaParallelSafetyWarningc           B` s   e  Z d  Z RS(   sc   
    Warning category for when an operation in a prange
    might not have parallel semantics.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   >   s   t   _ColorSchemec           B` sS   e  Z e d  „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z RS(   c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   codeJ   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   N   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   filenameR   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   indicateV   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR	   Z   s    (   R   R   R   R   R   R   R   R	   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   G   s
   t   _DummyColorSchemec           B` sA   e  Z d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C` s   d  S(   N(    (   R   t   theme(    (    s+   lib/python2.7/site-packages/numba/errors.pyR   a   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   d   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   g   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   j   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   m   s    c         C` s   d  S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR	   p   s    N(	   R   R   R   R   R   R   R   R   R	   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR    _   s   				t   __version__s   0.0.0t   .i   i	   sN   Insufficiently recent colorama version found. Numba requires colorama >= 0.3.9t(   NUMBA_DISABLE_ERROR_MESSAGE_HIGHLIGHTINGt   NOPColorSchemec           B` sA   e  Z d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C` s2   | d  k	 r t d ƒ ‚ n  t j |  d | ƒd  S(   Ns    specifying a theme has no effectR!   (   R   t
   ValueErrorR    R   (   R   R!   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR      s    c         C` s   | S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   •   s    c         C` s   | S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ˜   s    c         C` s   | S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ›   s    c         C` s   | S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ž   s    c         C` s   | S(   N(    (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR	   ¡   s    N(	   R   R   R   R   R   R   R   R   R	   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR%      s   				c           C` s   t  d  k r t ƒ  a  n  t  S(   N(   t   _termcolor_instR   R%   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ¤   s    (   t   initt   reinitt   deinitt   Foret   Stylet
   ColorShellc           B` s)   e  Z e Z d  „  Z d „  Z d „  Z RS(   c         C` s   t  ƒ  t |  _ d  S(   N(   R(   R   t   _has_initialized(   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ±   s    c         C` s   |  j  r t ƒ  n  d  S(   N(   R.   R)   (   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt	   __enter__µ   s    	c         G` s   t  j t ƒ  d  S(   N(   R,   t	   RESET_ALLR*   (   R   t
   exc_detail(    (    s+   lib/python2.7/site-packages/numba/errors.pyt   __exit__¹   s    (   R   R   t   FalseR.   R   R/   R2   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR-   ®   s   		t   reset_terminalc           B` s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C` s   t  d ƒ |  _ d  S(   Nt    (   t	   bytearrayt   _buf(   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ¾   s    c         C` s   |  j  S(   N(   R7   (   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR/   Á   s    c         G` s%   |  j  t t j j d ƒ ƒ 7_  d  S(   Ns   utf-8(   R7   R6   R,   R0   t   encode(   R   R1   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR2   Ä   s    (   R   R   R   R/   R2   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR4   ½   s   		R   R   R   R   R	   t   no_colort   dark_bgt   light_bgt   blue_bgt
   jupyter_nbt   HighlightColorSchemec           B` sS   e  Z e d  „ Z d e j d „ Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z RS(   c         C` sX   | d |  _  | d |  _ | d |  _ | d |  _ | d |  _ t j |  d | ƒd  S(   NR   R   R   R   R	   R!   (   t   _codet   _errmsgt	   _filenamet	   _indicatet
   _highlightR    R   (   R   R!   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ð   s    c         C` s…   d } | r | | 7} n  | r, | | 7} n  t  ƒ  J t ƒ  - } | | j d ƒ 7} | | j d ƒ 7} Wd  QX| j d ƒ SWd  QXd  S(   NR5   s   utf-8(   R-   R4   R8   t   decode(   R   R
   t   colort   stylet   featurest   mu(    (    s+   lib/python2.7/site-packages/numba/errors.pyt   _markupø   s    
c         C` s   |  j  | |  j ƒ S(   N(   RI   R?   (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR     s    c         C` s   |  j  | |  j ƒ S(   N(   RI   R@   (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR     s    c         C` s   |  j  | |  j ƒ S(   N(   RI   RA   (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   
  s    c         C` s   |  j  | |  j ƒ S(   N(   RI   RB   (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR     s    c         C` s   |  j  | |  j ƒ S(   N(   RI   RC   (   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR	     s    N(   R   R   t   default_themeR   R   R,   t   BRIGHTRI   R   R   R   R   R	   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR>   ï   s   				c          C` s/   t  d  k r+ t t j j }  t |  ƒ a  n  t  S(   N(   R'   R   t   themest   numbat   configt   COLOR_SCHEMER>   (   t   scheme(    (    s+   lib/python2.7/site-packages/numba/errors.pyR     s    s-  
Please report the error message and traceback, along with a minimal reproducer
at: https://github.com/numba/numba/issues/new

If more help is needed please feel free to speak to the Numba core developers
directly at: https://gitter.im/numba/numba

Thanks in advance for your help in improving Numba!
sÅ   
Unsupported functionality was found in the code Numba was trying to compile.

If this functionality is important to you please file a feature request at:
https://github.com/numba/numba/issues/new
s  
Unsupported Python functionality was found in the code Numba was trying to
compile. This error could be due to invalid code, does the code work
without Numba? (To temporarily disable Numba JIT, set the `NUMBA_DISABLE_JIT`
environment variable to non-zero, and then rerun the code).

If the code is valid and the unsupported functionality is important to you
please file a feature request at: https://github.com/numba/numba/issues/new

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html
s–  
Numba could not make a constant out of something that it decided should be
a constant. This could well be a current limitation in Numba's internals,
however please first check that your code is valid for compilation,
particularly with respect to string interpolation (not supported!) and
the requirement of compile time constants as arguments to exceptions:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html?highlight=exceptions#constructs

If the code is valid and the unsupported functionality is important to you
please file a feature request at: https://github.com/numba/numba/issues/new

If you think your code should work with Numba. %s
s¶  
This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new
sÊ   
-------------------------------------------------------------------------------
This should not have happened, a problem has occurred in Numba's internals.
You are currently using Numba version %s.
%s
t   unsupported_errort   typingt
   reportablet   interpretert   constant_inferencec         ` sB   t  |  t ƒ r |  n d ‰  ‡  f d †  } ˆ  s: | |  ƒ S| Sd S(   sÙ   Define a deprecation decorator.
    An optional string should refer to the new API to be used instead.

    Example:
      @deprecated
      def old_func(): ...

      @deprecated('new_func')
      def old_func(): ...c         ` s"   ‡  ‡ f d †  } t  ˆ  ƒ | ƒ S(   Nc          ` sN   d } ˆ r | d 7} n  t  j | j ˆ  j ˆ ƒ d t d d ƒˆ  |  | Ž  S(   Ns!   Call to deprecated function "{}".s   
 Use "{}" instead.t   categoryt
   stackleveli   (   t   warningst   warnt   formatR   t   DeprecationWarning(   t   argst   kwargsR
   (   t   funct   subst(    s+   lib/python2.7/site-packages/numba/errors.pyt   wrapperv  s    (   R   (   R^   R`   (   R_   (   R^   s+   lib/python2.7/site-packages/numba/errors.pyt	   decoratoru  s    N(   t
   isinstancet   strR   (   t   argRa   (    (   R_   s+   lib/python2.7/site-packages/numba/errors.pyt
   deprecatedh  s
    
t   WarningsFixerc           B` s8   e  Z d  Z d „  Z e j d d d „ ƒ Z d „  Z RS(   sº   
    An object "fixing" warnings of a given category caught during
    certain phases.  The warnings can have their filename and lineno fixed,
    and they are deduplicated as well.
    c         C` s   | |  _  t t ƒ |  _ d  S(   N(   t	   _categoryR   t   sett	   _warnings(   R   RV   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR     s    	c         c` sÌ   t  j d t ƒ  } t  j d |  j ƒ d VWd QXx’ | D]Š } t | j ƒ } t | j |  j ƒ r¥ | pp | j	 } | p | j
 } |  j | | | j f j | ƒ q: t  j | | j | j	 | j
 ƒ q: Wd S(   sN   
        Store warnings and optionally fix their filename and lineno.
        t   recordt   alwaysN(   RX   t   catch_warningsR   t   simplefilterRg   Rc   t   messaget
   issubclassRV   R   t   linenoRi   t   addt   warn_explicit(   R   R   Rp   t   wlistt   wR
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyRl   ’  s    #c         C` s|   d „  } x_ t  |  j j ƒ  d | ƒD]B \ \ } } } } x* t  | ƒ D] } t j | | | | ƒ qG Wq% W|  j j ƒ  d S(   s+   
        Emit all stored warnings.
        c         S` s   t  |  ƒ t  t |  ƒ ƒ S(   N(   Rc   t   id(   Rd   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   key«  s    Rv   N(   t   sortedRi   t   itemsRX   Rr   t   clear(   R   Rv   R   Rp   RV   t   messagesR
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   flush§  s    	+N(	   R   R   R   R   t
   contextlibt   contextmanagerR   Rl   R{   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyRf   †  s
   	t
   NumbaErrorc           B` s8   e  Z d e d  „ Z e d „  ƒ Z d „  Z d „  Z RS(   c         C` sŒ   | |  _  | |  _ | r' t ƒ  j } n	 d „  } | re t t |  ƒ j | d | | j ƒ  f ƒ ƒ n# t t |  ƒ j | d | f ƒ ƒ d  S(   Nc         S` s   |  S(   N(    (   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR	   Á  s    s   %s
%s
s   %s(   R
   R   R   R   R   R~   R   R   (   R   R
   R   R   R	   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   »  s    			 c         C` s1   y |  j  SWn t k
 r, g  |  _  } | SXd  S(   N(   t	   _contextst   AttributeError(   R   t   lst(    (    s+   lib/python2.7/site-packages/numba/errors.pyt   contextsÉ  s
    c         C` s`   |  j  j | ƒ t ƒ  j d ƒ t ƒ  j d ƒ } | j |  t |  j  ƒ | ƒ } | f |  _ |  S(   sv   
        Add contextual info.  The exception message is expanded with the new
        contextual information.
        s   {0}
s   [{1}] During: {2}(   R‚   t   appendR   R   R   RZ   t   lenR\   (   R   R
   t   ft   newmsg(    (    s+   lib/python2.7/site-packages/numba/errors.pyt   add_contextÑ  s    
c         C` s   | f |  j  d |  _  d S(   sD   
        Change the error message to the given new message.
        i   N(   R\   (   R   t   new_message(    (    s+   lib/python2.7/site-packages/numba/errors.pyt   patch_messageÝ  s    N(	   R   R   R   R   R   t   propertyR‚   R‡   R‰   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR~   ¹  s   	t   UnsupportedErrorc           B` s   e  Z d  Z RS(   sG   
    Numba does not have an implementation for this functionality.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR‹   ä  s   t   IRErrorc           B` s   e  Z d  Z RS(   s7   
    An error occurred during Numba IR generation.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyRŒ   ë  s   t   RedefinedErrorc           B` s   e  Z d  Z RS(   sU   
    An error occurred during interpretation of IR due to variable redefinition.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ò  s   t   NotDefinedErrorc           B` s   e  Z d  Z d d „ Z RS(   sK   
    An undefined variable is encountered during interpretation of IR.
    c         C` s3   | |  _  d | } t t |  ƒ j | d | ƒd  S(   Ns   Variable '%s' is not defined.R   (   t   nameR   RŽ   R   (   R   R   R   R
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   þ  s    	
N(   R   R   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyRŽ   ù  s   t   VerificationErrorc           B` s   e  Z d  Z RS(   s6  
    An error occurred during IR verification. Once Numba's internal
    representation (IR) is constructed it is then verified to ensure that
    terminators are both present and in the correct places within the IR. If
    it is the case that this condition is not met, a VerificationError is
    raised.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR     s   t
   MacroErrorc           B` s   e  Z d  Z RS(   s3   
    An error occurred during macro expansion.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR‘     s   t   DeprecationErrorc           B` s   e  Z d  Z RS(   s&   
    Functionality is deprecated.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR’     s   t   LoweringErrorc           B` s   e  Z d  Z d d „ Z RS(   s,   
    An error occurred during lowering.
    c         C` s    t  t |  ƒ j | d | ƒd  S(   NR   (   R   R“   R   (   R   R
   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   "  s    N(   R   R   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR“     s   t   UnsupportedParforsErrorc           B` s   e  Z d  Z RS(   sL   
    An error ocurred because parfors is not supported on the platform.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR”   &  s   t   ForbiddenConstructc           B` s   e  Z d  Z RS(   sN   
    A forbidden Python construct was encountered (e.g. use of locals()).
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR•   -  s   t   TypingErrorc           B` s   e  Z d  Z RS(   s#   
    A type inference failure.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR–   4  s   t   UntypedAttributeErrorc           B` s   e  Z d d  „ Z RS(   c         C` su   t  | d d  ƒ } | d  k	 r7 | t k r7 d | } n d } | j d | d | ƒ } t t |  ƒ j | d | ƒd  S(   Nt   pymodsP   Use of unsupported NumPy function 'numpy.%s' or unsupported use of the function.s)   Unknown attribute '{attr}' of type {type}t   typet   attrR   (   t   getattrR   t   npRZ   R   R—   R   (   R   t   valueRš   R   t   moduleR
   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   <  s    
N(   R   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR—   ;  s   t   ByteCodeSupportErrorc           B` s   e  Z d  Z d d „ Z RS(   sA   
    Failure to extract the bytecode of the user's function.
    c         C` s    t  t |  ƒ j | d | ƒd  S(   NR   (   R   RŸ   R   (   R   R
   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   M  s    N(   R   R   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyRŸ   H  s   t   CompilerErrorc           B` s   e  Z d  Z RS(   s0   
    Some high-level error in the compiler.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR    Q  s   t   ConstantInferenceErrorc           B` s   e  Z d  Z d d „ Z RS(   s,   
    Failure during constant inference.
    c         C` s    t  t |  ƒ j | d | ƒd  S(   NR   (   R   R¡   R   (   R   R   R   (    (    s+   lib/python2.7/site-packages/numba/errors.pyR   ]  s    N(   R   R   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR¡   X  s   t   InternalErrorc           B` s   e  Z d  Z d „  Z RS(   sA   
    For wrapping internal error occured within the compiler
    c         C` s)   t  t |  ƒ j t | ƒ ƒ | |  _ d  S(   N(   R   R¢   R   Rc   t   old_exception(   R   t	   exception(    (    s+   lib/python2.7/site-packages/numba/errors.pyR   f  s    (   R   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR¢   a  s   t   RequireLiteralValuec           B` s   e  Z d  Z RS(   sj   
    For signalling that a function's typing requires a constant value for
    some of its arguments.
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR¥   k  s   t   LiteralTypingErrorc           B` s   e  Z d  Z RS(   s*   
    Failure in typing a Literal type
    (   R   R   R   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyR¦   s  s   c         C` s   |  j  | | Ž  S(   N(   RZ   (   t   fmtR\   R]   (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   _format_msgz  s    c   	      o` s  | j  d t ƒ } | j d d ƒ } | d k	 rS | j j t ƒ rS t j | ƒ n  y	 d VWnª t	 k
 r } | j
 t |  | | ƒ ƒ ‚  n| t k
 r} | | ƒ j
 t |  | | ƒ ƒ } d d l m } | j ræ t j ƒ  d n d } t j t | ƒ | | ƒ n Xd S(   s!  
    A contextmanager that prepend contextual information to any exception
    raised within.  If the exception type is not an instance of NumbaError,
    it will be wrapped into a InternalError.   The exception class can be
    changed by providing a "errcls_" keyword argument with the exception
    constructor.

    The first argument is a message that describes the context.  It can be a
    format string.  If there are additional arguments, it will be used as
    ``fmt_.format(*args, **kwargs)`` to produce the final message string.
    t   errcls_R   Ni    (   RN   i   (   t   popR¢   t   getR   R   t
   startswitht   _numba_patht   loc_infot   updateR~   R‡   R¨   t	   ExceptionRM   RN   t   FULL_TRACEBACKSt   syst   exc_infoR   t   reraiseR™   (	   t   fmt_R\   R]   t   errclsR   t   et   newerrRN   t   tb(    (    s+   lib/python2.7/site-packages/numba/errors.pyt   new_error_context‚  s    	!t   _(   i    i   i	   (p   R   t
   __future__R    R   R   t   abcR|   t   osR²   RX   RM   t   numpyRœ   t   collectionsR   R   t	   functoolsR   R   t   __all__t   WarningR   R   R   R   R   t   add_metaclasst   ABCMetat   objectR   R    R   R'   t   coloramaR›   t   colorama_versiont   tuplet   splitR   t   intR
   RY   t   ImportErrort   environR«   R%   R   R(   R)   R*   R+   R,   R-   R4   RL   t   BLUEt   YELLOWt   WHITEt   GREENt   REDt   BLACKt   MAGENTAt   CYANRJ   R>   t   feedback_detailst   unsupported_error_infot   interpreter_error_infot   constant_inference_infot   typing_error_infoR"   t   reportable_issue_infot   dictt   error_extrasRe   Rf   R°   R~   R‹   RŒ   R   RŽ   R   R‘   R’   R“   R”   R•   R–   R—   RŸ   R    R¡   R¢   R¥   R¦   R¨   t   patht   dirnamet   __file__R­   R®   R}   Rº   t   globalsRx   R   R   R¬   Rb   R™   Ro   (    (    (    s+   lib/python2.7/site-packages/numba/errors.pyt   <module>   sÔ   	4	(













$	
	




	3+			
	