+
    ,i:                        R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt RtR t	]P                  ! RR4      tR t]P                  ! R4      t ! R	 R
4      tR tRR lt ^ RIHt  ! R R]4      t]! ]P.                  4      t]! ]P4                  4      t]^8X  d   ]P8                  '       g   R t]]n        M+]^8X  d   ]P8                  '       d   M]^8X  d   R t]]n        ]! ]4      tR tR tR#   ] d
    ^ RIHt  Li ; i)zU
Decorator module, see https://pypi.python.org/pypi/decorator
for the documentation.
N)getfullargspecz4.0.5c                     V P                   # N)__init__)clss   &6/usr/lib/python3/dist-packages/scipy/_lib/decorator.pyget_initr   .   s    <<    ArgSpeczargs varargs varkw defaultsc                    \        V 4      p\        VP                  VP                  VP                  VP
                  4      # )z$A replacement for inspect.getargspec)r   r
   argsvarargsvarkwdefaults)fspecs   & r   
getargspecr   7   s-    !D499dllDJJFFr	   z\s*def\s*([_\w][_\w\d]*)\s*\(c                   t   a  ] tR t^At o Rt]P                  ! 4       tRR ltR t	R	R lt
]R
R l4       tRtV tR# )FunctionMakerz
An object with the ability to create functions with a given signature.
It has attributes name, doc, module, signature, defaults, dict, and
methods update and make.
Nc           	        W0n         V'       EdT   VP                  V n        V P                  R 8X  d   RV n        VP                  V n        VP
                  V n        \        P                  ! V4      '       Ed   \        V4      p\        VR/ 4      V n        R F  p	\        W	\        W4      4       K  	  \        V P                  4       F  w  r\        V RV
 2V4       K  	  \        V P                  4      p\        V P                  4      pV P                   '       dF   VP#                  RV P                   ,           4       VP#                  RV P                   ,           4       M#V P$                  '       d   VP#                  R4       V P$                   F-  p	VP#                  V	 R24       VP#                  V	 RV	 24       K/  	  V P&                  '       dE   VP#                  RV P&                  ,           4       VP#                  RV P&                  ,           4       RP)                  V4      V n        RP)                  V4      V n         VP,                  P/                  4       V n        V'       d   W n        Ve   W0n        V'       d   W@n        V'       d   WPn        V'       d   W`n        V'       d   Wpn        \5        V R
4      '       g   Q h\5        V R4      '       g   \7        RV 24      hR	# )<lambda>_lambda___annotations__arg*z=None=z**, Nname	signaturez#You are decorating a non-function: )r   r   r   r   
kwonlyargskwonlydefaults)shortsignature__name__r   __doc__doc
__module__moduleinspect
isfunctionr   getattrannotationssetattr	enumerater   listr   appendr   r   joinr   __dict__copydictr   hasattr	TypeError)selffuncr   r   r   r$   r&   funcdictargspecair   allargsallshortargss   &&&&&&&&      r   r   FunctionMaker.__init__K   s%   '4DIyyJ&&	||DH//DK!!$''(.#*41BB#G ,ADWW%89, (		2FADCs)S1 3tyy/#DII<<<NN3#56 ''dll(:;___NN3'ANNaS;/ ''1#Qqc
3 ) :::NN4$**#45 ''tzz(9:!%7!3&*ii&=# MM..0	I &N$MH K ItV$$$$t[))A$HII *r	   c                   V P                   Vn        \        V RR4      Vn        \        V R/ 4      Vn        \        V RR
4      Vn        \        V RR4      Vn        \        V RR4      Vn         \        P                  ! ^4      pVP                  P                  RR4      p\        V R	V4      Vn        VP                  P                  V4       R#   \         d    Rp L>i ; i)z2Update the signature of func with the data in selfr$   Nr2   r   r    r*   r"   ?r&    )r   r"   r)   r#   r0   __defaults____kwdefaults__r   sys	_getframe	f_globalsgetAttributeErrorr%   update)r5   r6   kwframecallermodules   &&,  r   rH   FunctionMaker.update   s    		tUD1fb1#D*b9%d,<dC&t]DA	@MM!$E !??..z3?L!$,?R   	L	s   -C CCc           	        V\        V 4      ,          pT;'       g    / p\        P                  V4      pVf   \        RV 24      hVP	                  ^4      p\        V.V P                  P                  R4       Uu. uF  qP                  R4      NK  	  up,           4      p	V	 F  p
V
R9   g   K  \        V
 RV 24      h	  VP                  R4      '       g
   VR,          pR\        V P                  4       R2p \        W[R4      p\        W4       Y',          pT'       d   YTR&   T P$                  ! T3/ TB  T# u upi    \        R	\         P"                  R
7       \        T\         P"                  R
7       h ; i)zBMake a new function from a given template and update the signatureznot a valid function template
,z *z is overridden in

z<decorator-gen->singlezError in generated code:)file
__source__)_func__call_)varsDEFmatchSyntaxErrorgroupsetr!   splitstrip	NameErrorendswithnext_compile_countcompileexecprintrC   stderrrH   )r5   	src_templevaldict	addsourceattrssrcmor   r   namesnfilenamecoder6   s   &&&&,         r   makeFunctionMaker.make   sa   $t*$>>rYYs^: ?uEFFxx{TF"1177<>< 36iio<> > ?A((1#%8 >??  ||D!!4KC
 %T$*=*=%>$?qA	3(3D 
 ~"%,D"E"/>	,3::>#CJJ's   ;D;
;E   9E9c                $   \        V\        4      '       d+   VP                  4       P                  R^4      w  rV
RR pRpMRp	RpTpV ! WWWV4      pRP	                  R VP                  4        4       4      pVP                  ! RV,           W73/ VB # )z
Create a function from the strings name, signature, and body.
evaldict is the evaluation dictionary. If addsource is true, an
attribute __source__ is added to the result. The attributes attrs
are added, if any.
(NrO   c              3   4   "   T F  pR V,           x  K  	  R# 5i)z    Nr@   ).0lines   & r   	<genexpr>'FunctionMaker.create.<locals>.<genexpr>   s     F4ED&4--4Es   zdef %(name)s(%(signature)s):
)
isinstancestrr]   r\   r/   
splitlinesrp   )r   objbodyrg   r   r$   r&   rh   ri   r   restr   r6   r5   ibodys   &&&&&&&&,      r   createFunctionMaker.create   s     c3**32JDSb	IDDID4yC@		FDOO4EFFyy9EA!7057 	7r	   )r*   r   r2   r$   r&   r   r!   r   )NNNNNNN)NF)NNNT)r"   r%   __qualname____firstlineno__r#   	itertoolscountra   r   rH   rp   classmethodr   __static_attributes____classdictcell____classdict__s   @r   r   r   A   s>      __&N2Jh!"B 7 7r	   r   c                    V P                   P                  4       pWR&   WR&   \        P                  V RW R7      p\	        V R4      '       d   V P
                  Vn        V# )z=
decorate(func, caller) decorates a function using a caller.
rU   rT   z)return _call_(_func_, %(shortsignature)s)__wrapped__r   )__globals__r1   r   r   r3   r   )r6   callerrg   funs   &&  r   decorater      sh     $$&HXX


9  $C t^$$,,Jr	   c           	        Ve   \        W4      # \        P                  ! V 4      '       dD   V P                  P	                  4       p\        V 4      pRV P                   RV P                   R2pM\        P                  ! V 4      '       d0   V P                  R8X  d   RpMV P                  pT pV P                  pMPV P                  P                  P	                  4       pV P                  P                  pV P                  P                  pVP                  P                  4       pWR&   \         VR&   \        P                  V R2R	WTV P                  V R
7      # )z=decorator(caller) converts a caller function into a decoratorz
decorator(z2) converts functions/generators into factories of z objectsr   r   rU   
_decorate_z(func)zreturn _decorate_(func, _call_))r$   r&   r   )r   r'   isclassr"   lowerr   r(   r#   	__class____call____func__r   r1   r   r   r%   )r   _funcr   
callerfuncr$   rg   s   &&    r   	decoratorr      s+   &&v$$&f%
FOO, -%/x9			F	#	#??j(D??D
nn((..0__--
oo%%%%**,HX%H\&:&"3"3    r	   )_GeneratorContextManager)GeneratorContextManagerc                   &   a  ] tR t^t o R tRtV tR# )ContextManagerc           	     H    \         P                  VR\        WR7      VR7      # )zContext manager decoratorz.with _self_: return _func_(%(shortsignature)s))_self_rT   r   )r   r   r2   )r5   r6   s   &&r   r   ContextManager.__call__   s*    ##B* $ > 	>r	   r@   N)r"   r%   r   r   r   r   r   r   s   @r   r   r      s     > >r	   r   c                 :    \         P                  ! W! V/ VB 4      # r   r   r   r5   gr9   ks   &&*,r   r   r   	  s    '00q!zqzBBr	   c                 0    \         P                  ! WW#4      # r   r   r   s   &&*,r   r   r     s    '00!??r	   c                    Rp\        V4       F3  w  r4\        W@4      '       d   Rp M\        W4      '       g   K-  WV&   RpK5  	  V'       d   VP                  V 4       R# R# )zS
Append ``a`` to the list of the virtual ancestors, unless it is already
included.
TFN)r,   
issubclassr.   )r9   
vancestorsaddjvas   &&   r   r.   r.     s\    
 C:&bCaqMC ' ! r	   c                    a aa S '       g   Q R4       hRRP                  S 4       R2o\        P                  R3V 3R lloVV V3R lpRS,           Vn        V# )	zf
Factory of decorators turning a function into a generic function
dispatching on the given arguments.
zNo dispatch args passedrs   r   z,) c                z   < V! \        V 4      \        S4      4      '       d   \        R\        S4       R24      hR# )z5Make sure one passes the expected number of argumentsz	Expected z% arguments, got {len(arguments)}{msg}N)lenr4   )	argumentswrongmsgdispatch_argss   &&&r   checkdispatch_on.<locals>.check2  sA    Y]!344iM(:'; <8 8 9 9 5r	   c                ,  <a aaa \        \        S 4      P                  4      p\        S	4      V8:  g   \        RS
 24      h/ oVV	V3R loVV3R loVV3R lpVV3R lpVV V3R lp\        P                  S RS
 R2\        VR	7      VS SSSVS R
7
      # )z4Decorator turning a function into a generic functionzUnknown dispatch arguments c                 B  < S! V 4       \        \        S4      4       Uu. uF  p. NK  	  ppS	 FI  p\        WV4       F6  w  rEp\        WE4      '       g   K  WTP                  9  g   K+  \        WV4       K8  	  KK  	  V Uu. uF  p\        V4      NK  	  up# u upi u upi )z=
Get a list of sets of virtual ancestors for the given types
)ranger   zipr   __mro__r.   r[   )
types_rastypes_ttype_rar   r   typemaps
   *      r   r   5dispatch_on.<locals>.gen_func_dec.<locals>.vancestorsB  s     %L$S%7898!28C9!$'s$;LAb!!++YY0Fu) %< " '**cCGc** :
 +s   B Bc                 *  < S! V 4       . p\        V S! V !  4       Fs  w  r#\        V4      pV^8  d   \        RV RV 24      hV^8X  d%   Vw  p\        RW%3/ 4      P                  R,          pMVP                  pVP                  VRR 4       Ku  	  V# )z/
Get a list of virtual MROs, one for each type
zAmbiguous dispatch for z: r   :   NNNry   )r   r   RuntimeErrortyper   r.   )	r   listsr   vasn_vasr   mror   r   s	   *      r   	ancestors4dispatch_on.<locals>.gen_func_dec.<locals>.ancestorsN  s     %LEeZ%78C19&1!Bse<> >aZCBsQGR088<C))CS"X& 9 Lr	   c                 *   <a  S! S 4       VVV 3R lpV# )z=
Decorator to register an implementation for the given types
c                    < S! \        V 4      P                  \        P                  R V P                  ,           4       V SS&   V # )z in )r   r   operatorltr"   )r   r   r   r   s   &r   dec@dispatch_on.<locals>.gen_func_dec.<locals>.register.<locals>.decg  s5    nQ',,hkk6AJJ;NO!"r	   r@   )r   r   r   r   s   j r   register3dispatch_on.<locals>.gen_func_dec.<locals>.registera  s     %L Jr	   c                    < S! V 4       \         P                  ! S! V !  !   Uu. uF/  p\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      NK1  	  ppV# u upi )z1
An utility to introspect the dispatch algorithm
c              3   8   "   T F  qP                   x  K  	  R # 5ir   )r"   )ru   r9   s   & r   rw   Kdispatch_on.<locals>.gen_func_dec.<locals>.dispatch_info.<locals>.<genexpr>r  s     1SS   )r   producttuple)r   anclstr   r   s   *  r   dispatch_info8dispatch_on.<locals>.gen_func_dec.<locals>.dispatch_infom  sb     %L'//E1BCECs 51S1551S11C  EJEs
   A%Ac                 H  < \         ;QJ d    . R  V  4       F  NK  	  5M! R  V  4       4      p S	V,          pV! V/ VB #   \         d     Mi ; i\        P                  ! S! T!  !  p\	        T4       T F"  pS	P                  T4      pTf   K  T! T/ TB u # 	  S! T/ TB # )c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   )r   )ru   r   s   & r   rw   Gdispatch_on.<locals>.gen_func_dec.<locals>._dispatch.<locals>.<genexpr>w  s     =}$s))}r   )r   KeyErrorr   r   r`   rF   )
r   r   rI   r   r   combinationsr   r   r6   r   s
   &*,    r   	_dispatch4dispatch_on.<locals>.gen_func_dec.<locals>._dispatchv  s    E=}=EE=}==E&EN $~"~%   %,,i.?@L&KK'=d>b>) ' $$$s   	A   AAzreturn _f_(z, %%(shortsignature)s))_f_)r   defaultr   r   r   r   r   )r[   r   r   r^   r   r   r2   )r6   argsetr   r   r   r   r   r   r   r   dispatch_strs   f    @@@r   gen_func_dec!dispatch_on.<locals>.gen_func_dec8  s     ^D)../=!V+9,HII
	+	&
			%$ ##K~-CDY(D
i'T	 $ ; 	;r	   dispatch_on)r/   r   ner"   )r   r   r   r   s   j @@r   r   r   *  sU    
 333=tyy/03L'{{ 9T;l *L8Lr	   r   ) r#   rerC   r'   r   r   collectionsr   __version__r   
namedtupler
   r   rb   rW   r   r   r   
contextlibr   ImportErrorr   r   r   initr   r   n_argsr   contextmanagerr.   r   r@   r	   r   <module>r      s  < 
 
     "
 
 
 ,.G 	jj12D7 D7NBO3
>- > .778	TYY	Q;t|||C&Nq[T\\\q[@&N>*
$ea  ONOs   !C5 5DD