+
    :i7             
       h1   R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	t
^ RIHtHt ^ RIHtHtHtHtHt ^ RIHtHtHtHtHtHtHtHtHtHt ^ RIHtH t H!t! ^ RI"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t- ^ R	I.H/t/ ^ R
I0H1t1 ^ RI2H3t3H4t4H5t5H6t6H7t7 ^ RI8H9t9H:t: ^ RI;H<t< ^ RI=H>t>H?t? ^ RI@HAtAHBtB ^ RI2HCtC ^ RIDHEtFHGtHHItIHJtJHKtK R tLR tMR tNR tOR tPR tQR tRR tSR tTERUR ltUR tVR tW]4! ]W4      R 4       tXR tY]4! ]Y4      R  4       tZ]#! R!]P                  4      R" 4       t\R# t]]#! R$]P                  4      ])! ]-P                  4      R% 4       4       t`ERUR& ltaR' tbR( tc]#! ]P                  ]P                  ]P                  4      ]#! ]P                  ]P                  ]P                  4      ]#! ]P                  ]P                  ]P                  4      R) 4       4       4       th]#! ]P                  ]P                  ]P                  4      R* 4       tj]#! ]P                  ]P                  ]P                  ]P                  4      R+ 4       tm]#! ]n]P                  4      R, 4       to]#! R-]P                  4      R. 4       tq]!ERV8  d%   ]#! R/]P                  ]P                  4      R0 4       tr ! R1 R2]s4      tt ! R3 R4]t4      tu ! R5 R6]t4      tv ! R7 R8]t4      tw ! R9 R:]t4      tx ! R; R<]t4      ty ! R= R>]s4      tzR? t{]#! ]P                  ]P                  ]P                  4      R@ 4       t|RA t}RB t~RC tRD tRE tRF tRG tRH t]6RI 4       t]6RJ 4       t]3RK 4       tRL t]4! ]
EP                  4      RM 4       t]3RN 4       t]4! ]
EP                  4      RO 4       t]4! ]
EP                  4      RP 4       tRQ t]4! ]RRRS7      RT 4       t]4! ]RURS7      RV 4       tRW tRX t]#! RY]P                  4      RZ 4       tR[ t]#! RY]P                  ]P                  4      R\ 4       t]#! RY]P                  ]EP0                  ! ]P                  4      4      R] 4       t]4! ]
EP4                  4      ERUR^ l4       t]$! ]P                  R_4      R` 4       t]4! ]
EP:                  4      ERWRa l4       t]4! ]
EP>                  4      ERWRb l4       t]4! ]
EPB                  4      ERXRc l4       tRd tRe t]#! Rf]P                  ]P                  4      Rg 4       t]#! Rf]P                  ]EP0                  ! ]P                  4      4      Rh 4       t]!ERY8  d   ]4! ]
EPN                  4      Ri 4       tM]4! ]
EPN                  4      Rj 4       t]4! ]
EPR                  4      Rk 4       t]4! ]
EPV                  4      ERURl l4       t]#! Rm]P                  4      Rn 4       t]#! ]
EP\                  ]P                  4      Ro 4       t]#! Rp]P                  4      Rq 4       t]3Rr 4       t]3Rs 4       t]4! ]
EPf                  4      ERURt l4       t]5! ]P                  Ru4      ERZRv l4       tRw t]4! ]
EPn                  4      Rx 4       t]4! ]
EPr                  4      Ry 4       t]4! ]
EPv                  4      Rz 4       t]4! ]
EPz                  4      R{ 4       t]3R| 4       t]Pj                  ! ]P                  R}4      R~ 4       t]6R 4       tR t]4! ]RRRS7      R 4       t]#! R]P                  ]EP                  4      R 4       t]$! ]P                  R4      R 4       t]$! ]P                  R4      ]$! ]EP                  R4      R 4       4       t]$! ]P                  R4      ]$! ]EP                  R4      R 4       4       t]$! ]P                  R4      ]$! ]EP                  R4      R 4       4       t]$! ]P                  R4      R 4       t]$! ]P                  R4      ]$! ]EP                  R4      R 4       4       t]$! ]P                  R4      ]$! ]EP                  R4      R 4       4       t]$! ]EP                  R4      R 4       t]$! ]EP                  R4      R 4       t]$! ]EP                  R4      R 4       t]$! ]EP                  R4      R 4       t]$! ]P                  R4      R 4       t]$! ]EP                  R4      R 4       t]'! ]EP                  ]EP                  4      ]'! ]EP                  ]EP                  4      R 4       4       tR t]$! ]P                  R4      R 4       t]$! ]EP                  R4      ]$! ]EP                  R4      R 4       4       t]$! ]EP                  R4      R 4       t]$! ]P                  R4      R 4       t]$! ]P                  R4      R 4       tR t]5! ]P                  R4      ]5! ]P                  R4      R 4       4       tR t]$! ]EP                  R4      ! ]4       ]$! ]EP                  R4      ! ]4       ]#! R]EP                  ]P                  4      R 4       t]%! ]P                  4      R 4       t]#! R]P                  ]Pb                  4      R 4       t]%! ]EP                  4      R 4       t]&! ]EP                  4      R 4       t]#! R]EP                  ]Pb                  4      R 4       t]#! R]EP                  ]EP                  4      R 4       t]#! R]EP                  ]Pb                  ]P                  4      R 4       t]#! R]EP                  ]EP                  ]P                  4      R 4       t](! ]P                  4      R 4       t](! ]EP                  4      R 4       t](! ]EP                  4      R 4       t]#! ]EP                  ]P                  ]P                  4      R 4       t]7! ]P                  R4      R 4       tR tR tERZR ltERUR ltR tR tR t]$! ]P                  R4      R 4       t]#! R$]EP                  4      ])! ]-P                  4      R 4       4       t]#! ]P                  ]EP                  ]P                  4      R 4       Et ]#! ]P                  ]EP                  ]P                  ]P                  4      R 4       Et]#! ]n]EP                  4      R 4       Et]#! ]
EP                  ]P                  4      R 4       Et]#! R$]EP
                  4      ])! ]-P                  4      R 4       4       Et]#! ]]EP0                  ! ]P                  4      4      ]#! ]
EP                  ]EP0                  ! ]P                  4      4      R 4       4       Et]#! ]]P                  4      ]#! ]
EP                  ]P                  4      R 4       4       Et	]#! R$]EP                  4      ])! ]-P                  4      R 4       4       Et]#! ]
EP                  ]P                  4      R 4       Et]#! R$]EP                  4      ])! ]-P                  4      R 4       4       Et]#! ]EP                   ]EP                  ]EP                  4      R 4       EtR Et]C! ]P                  RRURS7      R 4       EtR Et]6R 4       EtR EtR EtR EtR Et]6R 4       Et]4! ]
EP6                  4      E]3R l4       Et]6R 4       Et]4! ]
EP>                  4      ERUR l4       Et ]6R 4       Et!]5! ]P                  R4      R 4       Et"]4! ]
EPF                  4      E]3R l4       Et$]4! ]
EPJ                  4      ERUR l4       Et&]4! ]
EPN                  4      ERUR l4       Et(]4! ]
EPR                  4      ERUR l4       Et*]4! ]
EPV                  4      ERUR l4       Et,]4! ]
EPZ                  4      ERUR l4       Et.]4! ]
EP^                  4      ERUR l4       Et0R Et1]Ph                  ! E]14      R 4       Et2]Ph                  ! ]
EPf                  4      R^ E]3R l4       Et4]4! ]
EPj                  4      ER[R l4       Et6]4! ]
EPn                  4      R 4       Et8]4! ]
EPr                  4      ER[R l4       Et:R Et;]4! ]
EPx                  4      ]5! ]P                  R4      ERUR l4       4       Et=R Et>]4! ]
EP~                  4      ERZR l4       Et@]4! ]
EP                  4      ERWR l4       EtBR EtC]6R 4       EtD]#! R]P                  4      R 4       EtE]4! ]
EP                  4      R 4       EtGR EtH]6R 4       EtI]4! ]
EP                  4      R 4       EtK]4! ]
EP                  4      ER  4       EtM]#! ER]P                  ]EP                  4      ]#! ER]P                  ]Pb                  4      ER 4       4       EtN]6ER 4       EtO]5! ]P                  ER4      ER 4       EtP]6ER 4       EtQ]4! ]
EP                  4      E]ER\^ 3ER l4       EtS]4! ]4      ERUER l4       EtT]4! ]4      ERUER	 l4       EtUER
 EtVER EtWER EtXER EtYER EtZER Et[ER Et\ER Et]]6ER 4       Et^]4! ]
EP                  4      ERUER l4       Et`ER EtaER EtbER EtcER Etd]6ER 4       Ete]4! ]
EP                  4      ER 4       EtfER EtgER Eth]4! ]
EP                  4      ER 4       Etj]4! ]
EP                  4      ER 4       Etl]4! ]
EP                  4      ER 4       EtnER EtoER  EtpER! EtqER" Etr]6ER# 4       Ets]4! ]
EP                  4      ER[ER$ l4       EtuER% Etv]6ER& 4       Etw]4! ]
EP                  4      ER' 4       EtyER( Etz]6ER) 4       Et{]4! ]
EP                  4      ER[ER* l4       Et}ER+ Et~]6ER, 4       Et]4! ]
EP                   4      ER- 4       Et]6ER. 4       Et]4! ]
EP                  4      ER/ 4       Et]!ERV8  d   ]4! ]
EP
                  4      ! E]4       ]6ER0 4       Et]4! ]
EP                  4      ER1 4       Et]Pj                  ! ]P                  ER24      ER3 4       Et]Pj                  ! ]P                  ER44      ER5 4       Et]4! ]
EP                  4      ER6 4       Et]4! ]
EP                  4      ER7 4       Et]6ER8 4       Et]4! ]
EP                   4      ER9 4       Et]4! ]
EP$                  4      ER[ER: l4       Et]4! ]
EP(                  4      ER[ER; l4       Et]4! ]
EP,                  4      ER< 4       Et]4! ]
EP0                  4      ER= 4       Et]4! ]
EP4                  4      ER> 4       Et/ EtER? EtER]ER@ lEtERA Et]#! ERB]P                  4      ERC 4       Et]4! ]
EPB                  4      ERD 4       Et]#! ERE]P                  ]Pb                  4      ]#! ]
EPF                  ]P                  ]Pb                  4      ERF 4       4       Et]'! ]P                  ]P                  4      ERG 4       Et]'! ]P                  ]EPL                  4      ]'! ]P                  ]EPN                  4      ]'! ]P                  ]P                  4      ]'! ]P                  ]EPP                  4      ]'! ]P                  ]EPR                  4      ]'! ]P                  ]EPT                  4      ]'! ]P                  ]EPV                  4      ERH 4       4       4       4       4       4       4       Et]'! ]P                  ]EPL                  4      ERI 4       EtERJ Et]EP^                  ! E]4      ERK 4       Et]#! E]]P                  ]P                  ]P                  4      ERL 4       Et]Ph                  ! ]
EPd                  EPf                  EPh                  4      ER^ERM l4       Et]Ph                  ! ]
EPd                  EPf                  EPj                  4      ERUERN l4       Et]4! E]4      ERO 4       Et]4! ]
EPp                  4      ERP 4       Et]4! ]
EPt                  4      ERQ 4       Et]3ERR 4       Et]4! ]
EPz                  4      ERS 4       Et]4! ]
EP~                  4      ER_ERT l4       EtR# (`  z[
Implementation of operations on Array objects and objects supporting
the buffer protocol.
N)ir)Constant)pndindexliteral_unroll)typestypingerrorscgutils	extending)
as_dtype
from_dtypecarrayfarrayis_contiguous
is_fortrancheck_is_integertype_is_scalar
lt_complex	lt_floats)type_can_asarrayis_nonelikenumpy_version)lower_builtinlower_getattrlower_getattr_genericlower_setattr_generic
lower_castlower_constantiternext_implimpl_ret_borrowedimpl_ret_new_refimpl_ret_untrackedRefType)	signature)StringLiteral)register_jitableoverloadoverload_method	intrinsicoverload_attribute)	quicksort	mergesort)slicing)_make_constant_bytes
bytes_type)tuple_setitembuild_full_slice_tuple)overload_classmethod)parse_dtypeparse_shape_parse_nested_sequence_sequence_of_arrays_choose_concatenation_layoutc                    \        VP                  V4      \        VP                  V4      .pV P                  P                  V4      pVP	                  RV4       R# )zn
Set the "range" metadata on a load instruction.
Note the interval is in the form [lower_bound, upper_bound).
rangeN)r   typemoduleadd_metadataset_metadata)builderloadlower_boundupper_boundrange_operandsmds   &&&&  O/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/np/arrayobj.pyset_range_metadatarD   .   sK    
 tyy+6tyy+68N		$	$^	4Bgr"    c                v    ^VP                   P                  ^,
          ,          ^,
          p\        W^ V4       R# )z>
Mark the result of a load instruction as positive (or zero).
N)r9   widthrD   )r=   r>   r@   s   && rC   mark_positiverH   9   s,     1,-2Kwa5rE   c                   a aaaa S P                   o\        P                  ! S4      oSP                  o ! VV VVV3R lRS4      oS# )z
Return the Structure representation of the given *array_type*
(an instance of types.ArrayCompatible).

Note this does not call __array_wrap__ in case a new array structure
is being created (rather than populated).
c                   R   <a a ] tR t^Mt oVV VV3R lt]VV3R l4       tRtVtV ;t	# )make_array.<locals>.ArrayStructc                t  < \        S
S	4      p V P                  P                  R V4      pT P                  P                  S	,          pT P                  T4      pTf%   \        P                  ! T P                  TRR7      pMTpT! T P                  T34      pYa3#   \         d    \        ST `  T4      u # i ; i)	__array__T)zfill)r#   _contextget_functionNotImplementedErrorsuper
_make_refsdata_model_manager_get_be_typer	   alloca_once_builder)selfrefsig
array_impl	datamodelbe_type	outer_refArrayStruct	__class__
array_typereal_array_types   &&     rC   rS   *make_array.<locals>.ArrayStruct._make_refsO   s    OZ8C@!]]77SI

 88DI''	2G{#//w6:<	  	 T]]YL9C>! ' @[$:3??@s   B B76B7c                N  < V P                   pS^ 8X  d   SP                  V R4      # V P                  R4      p. p\        S4       FH  p\        P
                  ! W^ V4      pVP                  V4      pVP                  V4       \        W4       KJ  	  \        P                  ! W4      # )zD
Override .shape to inform LLVM that its elements are all positive.
shape)
rW   __getattr___get_ptr_by_namer8   r	   gep_inboundsr>   appendrH   
pack_array)	rX   r=   ptrdimsidimptrr>   basendims	   &      rC   re   %make_array.<locals>.ArrayStruct.shapec   s    
 mmGqy''g66 ''0CD4[ --gAqA||F+D!g,	 ! %%g44rE    )
__name__
__module____qualname____firstlineno__rS   propertyre   __static_attributes____classdictcell____classcell__)r`   __classdict__r_   ra   ro   rp   rb   s   @@rC   r_   rK   M   s(     	" 	"( 
	5 
	5 	5rE   r_   )as_arrayr	   create_struct_proxyrp   )ra   r_   ro   rp   rb   s   f@@@@rC   
make_arrayr~   A   sE     !))O&&7DD+5 +5d +5Z rE   c                Z    V P                  VP                  4      pV P                  V4      # )z:
Return the item size for the given array or buffer type.
)get_data_typedtypeget_abi_sizeof)contextra   lltys   && rC   get_itemsizer   }   s+       !1!12D!!$''rE   c                j    VP                   '       d   RM^pV P                  WP                  VVR7      # )z+
Load the item at the given array pointer.
Nalign)alignedunpack_valuer   )r   r=   arraytyrk   r   s   &&&& rC   	load_itemr      s6     OOODE&+   - -rE   c                j    VP                   '       d   RM^pV P                  WP                  W4VR7      # )z,
Store the item at the given array pointer.
Nr   )r   
pack_valuer   )r   r=   r   valrk   r   s   &&&&& rC   
store_itemr      s/     OOODEg}}ceLLrE   c                    VP                   '       d;   V P                  WV\        P                  4      p\        P
                  ! WV4      pV# V P                  WV\        P                  4      pV# )zE
Fix the integer index' type and value for the given dimension size.
)signedcastr   intpr,   	fix_indexuintp)r   r=   idxtyidxsizeinds   &&&&& rC   fix_integer_indexr      sY     |||ll7

;d3 J ll7<JrE   c                .   \        V\        P                  4      '       dt   VP                  ^ 8X  dc   \        VP                  \        P
                  4      '       g   Q h\        V4      ! WV4      p\        WW$P                  4      pVP                  V3# W#3# )zK
Normalize the index type and value.  0-d arrays are converted to scalars.
)	
isinstancer   Arrayrp   r   Integerr~   r   data)r   r=   r   r   idxaryidxvals   &&&&  rC   normalize_indexr      sr     %%%%**/%++u}}5555E"7S97UKK@{{F""zrE   c                    \        V4      '       d4   \        \        W#4       UUu. uF  w  rE\        WVV4      NK  	  upp!  w  r#W#3# u uppi )zR
Same as normalize_index(), but operating on sequences of
index types and values.
)lenzipr   )r   r=   index_typesindicesr   r   s   &&&&  rC   normalize_indicesr      sX    
 7||"7:;7P%'7P &5Wu58&:7P%'  ( 	%'s   A
c                   V P                   pV P                  pV P                  p	\        P                  ! \        P
                  ^R4      p
VP                  V
,          p\        VP                  4      p\        V	P                  4      pW,          V8w  d<   W,
          pRV P                   R\        V4      ^8  d   RMR RV R2p\        V4      hVf+   \        VP                  V	P                  R	4      4      R4      pVP                  \        P                  4      p\!        V\"        \$        34      '       d   \&        P(                  ! WV4      p\!        V\"        \$        34      '       d   \&        P(                  ! WV4      p\!        V\*        4      '       d	   V! V4      p\-        VVVVVR
7      pVf/   \        VP                  V	P                  R4      4      R4      VR&   MVVR&   VP/                  \        P                  ^4      p\&        P0                  ! WVP2                  P4                  4      pV F  pVP7                  VVR.R7      pK  	  VVR&   \        VP9                  4       4      pVV8w  d"   \        RP;                  VV,
          4      4      hVP=                  4        F  w  pp\?        V VV4       K  	  V # )z
Helper function for populating array structures.
This avoids forgetting to set fields.

*shape* and *strides* can be Python tuples or LLVM arrays.
CzThe datamodel for type z is missing fields  .Nmeminfo)re   stridesr   itemsizer   parentnswflagsnitemszmissing {0}) rO   rW   
_datamodelr   r   float64rT   set_fields_fe_typer   
ValueErrorr   get_value_typeget_typer   r   tuplelistr	   rj   intdictget_constantunpack_tupler9   countmulkeysformatitemssetattr)arrayr   re   r   r   r   r   r   r=   r\   standard_arraystandard_array_type_datamodelrequired_fieldsdatamodel_fieldsmissingmsgintp_tattrsr   unpacked_shapeaxlen
got_fieldskvs   &&&&&&&                 rC   populate_arrayr      sn    nnGnnG  I [[37N$+$>$>~$N!7??@O9,,- 	*>!4((8 9!'lQ.sB7q	Do711y)+,02 ##EJJ/F%%''""76:'E4=))$$Wv>(C  (#u " 	#E ~"7#9#9x($*+/1h !h!!%**a0F))'%**:J:JKNVU5':  E(O UZZ\"J_$--o
.JKLL 1q!  LrE   c                n   VP                   pVP                  pVP                  \        P                  ^4      p\
        P                  ! W1P                  V P                  4      pV F  pVP                  WFR.R7      pK  	  WAn
        VP                  \        P                  \        W 4      4      Vn        R# )z{
Update some auxiliary information in *array* after some of its fields
were changed.  `itemsize` and `nitems` are updated.
r   r   N)rO   rW   r   r   r   r	   r   re   rp   r   r   r   r   )arytyr   r   r=   r   r   r   s   &&     rC   update_array_infor     s    
 nnGnnG !!%**a0F))';;

KNV5':  L))%***6w*FHENrE   c                    \        4       h)z/Constrain axis values to valid positive values.rQ   	func_namearg_namerp   axiss   &&&&rC   normalize_axisr         

rE   c                    a \        V \        4      '       g   \        P                  ! R 4      h\        V\        4      '       g   \        P                  ! R4      hV P                   RVP                   R2oV3R lpV# ) func_name must be a str literal.arg_name must be a str literal.: Argument * out of bounds for dimensions of the arrayc                 V   < V^ 8  d	   W2,          pV^ 8  g   W28  d   \        S4      hV#     r   )r   r   rp   r   r   s   &&&&rC   impl&normalize_axis_overloads.<locals>.impl%  s+    !8LD!8t|S/!rE   )r   r$   r   TypingErrorliteral_value)r   r   rp   r   r   r   s   &&&& @rC   normalize_axis_overloadsr     sx    i//  !CDDh..  !BCC ""
#;x/E/E.F G4 	4 
 KrE   c                    \        4       h)zFNormalizes an axis argument into a tuple of non-negative integer axes.r   r   s   &&&&rC   normalize_axis_tupler   0  r   rE   c                   aaaa \        V \        4      '       g   \        P                  ! R 4      h\        V\        4      '       g   \        P                  ! R4      hV P                   RVP                   R2oV P                   RVP                   R2o\        V\
        P                  4      '       d	   V3R lpV# \        V4      oRS,          oVVVV3R lpV# )	r   r   r   r   z: repeated axis in z	 argumentc                 X   < V^ 8  d	   W2,          pV^ 8  g   W28  d   \        S4      hV3# r   r   )r   r   rp   r   invalid_axis_msgs   &&&&rC   r   ,normalize_axis_tuple_overloads.<locals>.implH  s/    axax4< !1227NrE   c                    < S	p\        V4       F8  w  rVV^ 8  d	   Wb,          pV^ 8  g   Wb8  d   \        S4      h\        WEV4      pK:  	  \        \	        V4      4      S8w  d   \        S
4      hV# r   )	enumerater   r/   r   r   )r   r   rp   r   	norm_axisrm   axaxis_lenr   norm_axis_initrepeated_axis_msgs   &&&&   rC   r   r   T  sn    &I"46JB6RZ$%566));	 ) 3y>"h. !233rE   r   )r   r$   r   r   r   r   r   r   )	r   r   rp   r   r   r   r   r   r   s	   &&&& @@@@rC   normalize_axis_tuple_overloadsr  5  s    i//  !CDDh..  !BCC ""
#;x/E/E.F G4 	4  ""
##6!!
")	- 
 $&&	4 K# t9	 	 KrE   getiterc                    VP                   w  pVw  pV P                  WP                  4      pV P                  \        P
                  ^ 4      p\        P                  ! W4      pWn        WVn	        V P                  '       d   V P                  P                  WV4       VP                  4       p	\        WVP                  V	4      p
V
# r   )argsmake_helperreturn_typer   r   r   r	   alloca_once_valueindexr   
enable_nrtnrtincref	_getvaluer    )r   r=   rZ   r  r   r   iterobjzeroindexptrresouts   &&&&       rC   getiter_arrayr  e  s    IWGU!!'??;G

A.D((7HMM 7U3



C 7S__c
BCJrE   c           
        \         P                  ! WP                  VP                  R7      p\         P                  ! WP                  VP                  R7      pVP                  V^ ,          V4      p\         P                  ! WP                  V4      p	VR,          p
VR,          p\        V\        P                  4      '       d    \        WW4VWV4      pVP                  4       # V
'       d   Q h\        WW94      # )z0Evaluate `ary[idx]`, where idx is a single int. r      NN)r	   r   re   rp   r   r   pointer_addr   r   r   Buffer	make_viewr  r   )r   r=   r  r   aryr   shapesr   offsetdataptrview_shapesview_stridesretarys   &&&&&&       rC   _getitem_array_single_intr!  }  s     !!'99EJJGF""7KKuzzJG[[S)F!!'88V<G*K2;L+u||,,7U"?!! 5::rE   iternextc           
         VP                   w  pVw  pVP                  pV P                  WVR 7      p\        V4      ! WVP                  R 7      p	\
        P                  ! WP                  ^R7      w  p
VP                  VP                  4      pVP                  RW4      pVP                  V4       VP                  V4      ;_uu_ 4        \        WVP                  WyV4      pVP                  V4       \
        P                   ! W4      pVP#                  WP                  4       RRR4       R#   + '       g   i     R# ; i)valuer  <N)r  ra   r  r~   r   r	   r   re   r>   r  icmp_signed	set_validif_thenr!  
yield_typeyield_increment_indexstore)r   r=   rZ   r  resultitertyiterr   r  r  r   r  is_validr%  nindexs   &&&&&          rC   iternext_arrayr3    s     xxHVFTG!!'!>G
W
ggmm
DC""7IIQ?GFLL'E""36H
X		"	")f//u
 	e((8fmm, 
#	"	"	"s   
AD//E 	c           
     L   V P                  \        P                  ^ 4      pV P                  \        P                  ^4      p\        P                  ! WP
                  VP                  4      p	\        P                  ! WP                  VP                  4      p
. p. p. p\        V Uu. uF  p\        V4      '       g   K  VNK  	  up4      p^ p\        WT4       EFF  w  ppV\        P                  J d   VP                  \        V4      ,
          ^,           V,           p\        V4       FM  pVP                  V4       VP                  V	V,          4       VP                  V
V,          4       V^,          pKO  	  K  \        V\        P                  4      '       d   V P!                  VVVR7      p\"        P$                  ! WVV4       \"        P&                  ! VVV	V,          4       VP                  VP(                  4       \"        P*                  ! VV4      p\"        P,                  ! VVV
V,          4      pVP                  V4       VP                  V4       M\        V\        P.                  4      '       dP   \1        WVVV	V,          4      pV'       d!   \        P2                  ! WVV	V,          V4       VP                  V4       ML\        V4      '       d-   VP                  V4       VP                  V4       V^,          pM\5        RV: 24      hV^,          pEKI  	  VVP                  8:  g   Q hVVP                  8  d<   VP                  V	V,          4       VP                  V
V,          4       V^,          pKL  \        P6                  ! WW#VRRR7      pVW3# u upi )z
Perform basic indexing on the given array.
A (data pointer, shapes, strides) tuple is returned describing
the corresponding view.
r$  unexpected index type: F
wraparoundboundscheck)r   r   r   r	   r   re   rp   r   r   r   r   ellipsisr8   ri   r   	SliceTyper  r,   guard_invalid_slice	fix_slicestartget_slice_length
fix_strider   r   do_boundscheckrQ   get_item_pointer)r   r=   r   r  r   r   r8  r  oner  r   output_indicesoutput_shapesoutput_stridesr   num_newaxesr   indexvalr   	n_missingrm   sliceshstr   r  s   &&&&&&&                   rC   basic_indexingrL    s    

A.D


uzz1
-C!!'99ejjAF""7KKDGNMNkFks[5EsskFGK	
Bw4%ENN"

S\1A5CI9%%%d+$$VBZ0%%gbk2a	 &
 eU__--''h'GE''%GgufRj9!!%++.))'59B##GUGBK@B  $!!"%u}}--#GeX$*2J0C&&wfRj"M!!#&  %!!$'!GB%U&LMM
aA 5F 
uzz/VBZ(gbk*
a &&w'527ULG ]33a Gs   &N!>N!c           
         \        V4      ! W4      p\        VVVVVP                  VP                  VP                  R7       V# )z>
Build a view over the given array with the given parameters.
r   re   r   r   r   r   )r~   r   r   r   r   )	r   r=   r   r  r  r   r  r   r   s	   &&&&&&&& rC   r  r    sB    
 $W6F6"LL;;**& MrE   c           
         \        WW4WVV P                  R7      w  rxp	\        V\        P                  4      '       d    \        WW4VWxV	4      p
V
P                  4       # V'       d   Q h\        WW74      # )zd
Return the result of indexing *ary* with the given *indices*,
returning either a scalar or a view.
r8  )rL  enable_boundscheckr   r   r  r  r  r   )r   r=   r  r   r  r   r   r  r  r  r   s   &&&&&&&    rC   _getitem_array_genericrR    sr     	w[#*#=#=	? 'G, +u||,,7U"?!! 5::rE   c           	        VP                   w  rEVw  rg\        V\        P                  4      '       g   VP                  ^8  g   Q h\        V4      ! WV4      p\        WVP                  WFV3V34      p\        WVP                  V4      # )z1
Basic indexing with an integer, slice, or None.
)	r  r   r   NoneTyperp   r~   rR  r  r   	r   r=   rZ   r  r   r   r  r   r  s	   &&&&     rC   getitem_arraynd_intprV    sz     88LEHC eU^^,,zzQ
U
Gc
2C
 3??!&eXv?CWsDDrE   c           
        VP                   w  rEVw  rg\        V4      ! WV4      pVP                  p\        P                  ! W\        V4      R7      p	\        WW4      w  r\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        WW#WFW4      # \        WVP                  WFW4      p
\        WVP                  V
4      # )z*
Basic or advanced indexing with a tuple.
r  c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5iNr   r   r   ).0tys   & rC   	<genexpr>&getitem_array_tuple.<locals>.<genexpr>:  s     
=2:b%++&&   ')TF)r  r~   r   r	   r   r   r   anyfancy_getitemrR  r  r   )r   r=   rZ   r  r   tuptyr  tupr   r   r  s   &&&&       rC   getitem_array_tuplerd  +  s    
 88LEHC
U
Gc
2C++K""7s5zBG,W-8CK s
=
=sss
=
===Ws"? 	? !3??!&[CCWsDDrE   c           
        VP                   w  rEpVw  rxp	\        V\        P                  4      '       d/   VP                  p
\        P
                  ! W\        V4      R7      pMV3p
V3p\        V4      ! WV4      p\        WW4      w  r \        WWGWV P                  R7      w  rp\        V4      pV'       d   \        WW#W4      # V P                  WWdP                  4      p	\!        WWIX4       R#   \         d    Rp LOi ; i)z<
array[a] = scalar_or_array
array[a,..,b] = scalar_or_array
r  rP  TN)r  r   r   	BaseTupler	   r   r   r~   r   rL  rQ  boolrQ   fancy_setslicer   r   r   )r   r=   rZ   r  r   r   valtyr  r   r   r   r   r  r  r   use_fancy_indexings   &&&&            rC   setitem_arrayrk  D  s    ((E%MCc%))kk&&w3u:Fh&
U
Gc
2C -W-8CK*7U'.'A'AC 	! "&\ g)4 	4 ,,wUKK
8CwW5  "!"s   
C1 1D Dc                     VP                   w  pVw  p\        V4      pV! WV4      pVP                  pVP                  V^ 4      p\	        WVP
                  V4      # r   )r  r~   re   extract_valuer!   r  )	r   r=   rZ   r  r   r  arysttyshapearyr  s	   &&&&     rC   	array_lenrp  m  sX    xxHUFSG
'C
(CyyH


!
,CgEErE   z
array.itemc           	         VP                   w  pVw  p\        V4      ! WV4      pVP                  pVP                  VP	                  R WfP                  ^4      4      RR7      ;_uu_ 4        RpV P                  P                  V\        V34       RRR4       \        WWEP                  4      #   + '       g   i     L&; i)!=Flikelyz>item(): can only convert an array of size 1 to a Python scalarN)r  r~   r   r)  r'  r9   	call_convreturn_user_excr   r   r   )r   r=   rZ   r  r   r  r   r   s   &&&&    rC   
array_itemrw  x  s    XXFEDC
U
Gc
2CZZF	,,T6;;q>J % 
 
' 
'N))':vF
'
 Wuhh77
' 
's   +%B..B>	zarray.itemsetc           	         VP                   w  rEVw  rgWTP                  8X  g   Q h\        V4      ! WV4      pVP                  pVP	                  VP                  R WP                  ^4      4      RR7      ;_uu_ 4        Rp	V P                  P                  V\        V	34       RRR4       \        WWGVP                  4       V P                  4       #   + '       g   i     L7; i)rr  Frs  z/itemset(): can only write to an array of size 1N)r  r   r~   r   r)  r'  r9   ru  rv  r   r   r   get_dummy_value)
r   r=   rZ   r  r   ri  r  r   r   r   s
   &&&&      rC   array_itemsetrz    s    xx####6__W00v{{1~N$)  + +CC--gzC6J+
 	7U:&&((+ +s   =%CC!	c                   H   a  ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )Indexeri  ze
Generic indexer interface, for generating indices over a fancy indexed
array on a single dimension.
c                    \         h)zM
Prepare the indexer by initializing any required variables, basic
blocks...
r   rX   s   &rC   prepareIndexer.prepare  
    
 "!rE   c                    \         h)z-
Return this dimension's size as an integer.
r   r~  s   &rC   get_sizeIndexer.get_size  
     "!rE   c                    \         h)z+
Return this dimension's shape as a tuple.
r   r~  s   &rC   	get_shapeIndexer.get_shape  r  rE   c                    \         h)ze
Return a half-open [lower, upper) range of indices this dimension
is guaranteed not to step out of.
r   r~  s   &rC   get_index_boundsIndexer.get_index_bounds  r  rE   c                    \         h)a  
Start indexation loop.  Return a (index, count) tuple.
*index* is an integer LLVM value representing the index over this
dimension.
*count* is either an integer LLVM value representing the current
iteration count, or None if this dimension should be omitted from
the indexation result.
r   r~  s   &rC   	loop_headIndexer.loop_head  s
     "!rE   c                    \         h)z
Finish indexation loop.
r   r~  s   &rC   	loop_tailIndexer.loop_tail  r  rE   rr   N)rs   rt   ru   rv   __doc__r  r  r  r  r  r  rx   ry   r{   s   @rC   r|  r|    s-     
""""	"" "rE   r|  c                   N   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )EntireIndexeri  z2
Compute indices along an entire array dimension.
c                    Wn         W n        W0n        W@n        WPn        V P                   P                  \        P                  4      V n        R # rY  )	r   r=   r   r  dimr   r   r   ll_intp)rX   r   r=   r   r  r  s   &&&&&&rC   __init__EntireIndexer.__init__  s5    
||225::>rE   c                &   V P                   pVP                  V P                  P                  V P                  4      V n        \        P                  ! WP                  4      V n	        VP                  4       V n        VP                  4       V n        R # rY  )r=   rm  r  re   r  r   r	   rV   r  r  append_basic_blockbb_startbb_endrX   r=   s   & rC   r  EntireIndexer.prepare  sa    ,,))$((..$((C	((,,?
224002rE   c                    V P                   # rY  r   r~  s   &rC   r  EntireIndexer.get_size  s    yyrE   c                    V P                   3# rY  r  r~  s   &rC   r  EntireIndexer.get_shape  s    		|rE   c                <    V P                  ^ 4      V P                  3# r   r  r   r~  s   &rC   r  EntireIndexer.get_index_bounds      Q++rE   c                   V P                   pV P                   P                  \        V P                  ^ 4      V P                  4       VP                  V P                  4       VP                  V P                  4       VP                  V P                  4      pVP                  VP                  RW P                  4      RR7      ;_uu_ 4        VP                  V P                  4       RRR4       W"3#   + '       g   i     Y"3# ; ir   >=Frs  N)r=   r-  r   r  r  branchr  position_at_endr>   r)  r'  r   r  )rX   r=   	cur_indexs   &  rC   r  EntireIndexer.loop_head  s    ,,8DLL!4djjAt}}%.LL,	__W00y))L$)  + +NN4;;'+ ##+ + ##s   C44D	c                   V P                   p\        P                  ! WP                  V P                  4      4      pVP                  W P                  4       VP                  V P                  4       VP                  V P                  4       R # rY  )
r=   r	   r,  r>   r  r-  r  r  r  r  rX   r=   
next_indexs   &  rC   r  EntireIndexer.loop_tail  sZ    ,,,,Wll4::6NO
j**-t}}%,rE   )
r  r   r  r  r=   r   r  r  r  r   Nrs   rt   ru   rv   r  r  r  r  r  r  r  r  rx   ry   r  s   @rC   r  r    s2     ?3,
$- -rE   r  c                   N   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )IntegerIndexeri  z(
Compute indices from a single integer.
c                    Wn         W n        W0n        V P                   P                  \        P
                  4      V n        R # rY  )r   r=   r   r   r   r   r  )rX   r   r=   r   s   &&&&rC   r  IntegerIndexer.__init__  s+    ||225::>rE   c                    R # rY  rr   r~  s   &rC   r  IntegerIndexer.prepare      rE   c                .    \        V P                  ^4      # r  )r   r  r~  s   &rC   r  IntegerIndexer.get_size  s    a((rE   c                    R# Nrr   rr   r~  s   &rC   r  IntegerIndexer.get_shape  s    	rE   c                    V P                   V P                  P                  V P                   V P                  4       4      3# rY  )r   r=   addr  r~  s   &rC   r  IntegerIndexer.get_index_bounds  s,    $,,**488T]]_EFFrE   c                    V P                   R 3# rY  )r   r~  s   &rC   r  IntegerIndexer.loop_head  s    xx~rE   c                    R # rY  rr   r~  s   &rC   r  IntegerIndexer.loop_tail  r  rE   )r=   r   r   r  Nr  r  s   @rC   r  r    s3     ?)G rE   r  c                   N   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )IntegerArrayIndexeri   z3
Compute indices from an array of integer indices.
c                    Wn         W n        W0n        W@n        WPn        VP
                  ^8X  g   Q hV P                   P                  \        P                  4      V n	        R# r  N)
r   r=   r   r   r   rp   r   r   r   r  )rX   r   r=   r   r   r   s   &&&&&&rC   r  IntegerArrayIndexer.__init__%  sE    
	zzQ||225::>rE   c                (   V P                   p\        P                  ! WP                  P                  4      ^ ,          V n        \        P                  ! WP                  4      V n        VP                  4       V n
        VP                  4       V n        R# r   N)r=   r	   r   r   re   idx_sizerV   r  	idx_indexr  r  r  r  s   & rC   r  IntegerArrayIndexer.prepare.  sb    ,,,,Wkk6G6GHK ,,WllC224002rE   c                    V P                   # rY  r  r~  s   &rC   r  IntegerArrayIndexer.get_size5  s    }}rE   c                    V P                   3# rY  r  r~  s   &rC   r  IntegerArrayIndexer.get_shape8  s    rE   c                <    V P                  ^ 4      V P                  3# r   r  r~  s   &rC   r  $IntegerArrayIndexer.get_index_bounds;  r  rE   c                   V P                   pV P                   P                  \        V P                  ^ 4      V P                  4       VP                  V P                  4       VP                  V P                  4       VP                  V P                  4      pVP                  VP                  RW P                  4      RR7      ;_uu_ 4        VP                  V P                  4       RRR4       \        V P                  WP                  P                   V P                  V P"                  V4      p\%        V P                  VV P                  P                   W0P&                  4      pW23#   + '       g   i     L; ir  )r=   r-  r   r  r  r  r  r  r>   r)  r'  r  r  r!  r   r   r   r   r   r   )rX   r=   r  r  s   &   rC   r  IntegerArrayIndexer.loop_head?  s   ,,8DLL!4dnnEt}}%.LL0	__i?  
 
 NN4;;'	
 *LL'::#3#3TZZ
 "$,,"&**"2"2E99F
 
s   E++E;	c                    V P                   p\        P                  ! VVP                  V P                  4      4      pVP                  W P                  4       VP                  V P                  4       VP                  V P                  4       R # rY  )
r=   r	   r,  r>   r  r-  r  r  r  r  r  s   &  rC   r  IntegerArrayIndexer.loop_tailT  s`    ,,,,W-4\\$..-IK
j..1t}}%,rE   )
r  r  r=   r   r  r  r   r   r  r   Nr  r  s   @rC   r  r     s2     ?3 , *- -rE   r  c                   N   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )BooleanArrayIndexeri]  z6
Compute indices from an array of boolean predicates.
c                    Wn         W n        W0n        W@n        VP                  ^8X  g   Q hV P                   P                  \        P                  4      V n        \        V P                  ^ 4      V n
        R# r  )r   r=   r   r   rp   r   r   r   r  r   r  )rX   r   r=   r   r   s   &&&&&rC   r  BooleanArrayIndexer.__init__b  sR    
zzQ||225::>T\\1-	rE   c                   V P                   p\        P                  ! WP                  P                  4      ^ ,          V n        \        P                  ! WP                  4      V n        \        P                  ! WP                  4      V n	        VP                  4       V n        VP                  4       V n        VP                  4       V n        R# r  )r=   r	   r   r   re   r   rV   r  r  r   r  r  bb_tailr  r  s   & rC   r  BooleanArrayIndexer.preparek  s    ,,((++2C2CDQG	 ,,WllC((,,?
224113002rE   c           
     2   V P                   p\        P                  ! WP                  4      p\        P                  ! WP
                  4      ;_uu_ 4       pVP                  V4      p\        V P                  WP                  P                  V P                  V P                  VP                  4      pVP                  WAP                  WTP                  4      4      pVP!                  WB4       R R R 4       VP                  V4      #   + '       g   i     L!; irY  )r=   r	   r  r  	for_ranger   r>   r!  r   r   r   r   r  r  zextr9   r-  )rX   r=   r   loopcpreds   &     rC   r  BooleanArrayIndexer.get_sizet  s    ,,))'99=w		22dU#A,gzz'7'7

DKKD A||D&&9:AMM!# 3 ||E"" 32s   BDD	c                $    V P                  4       3# rY  r  r~  s   &rC   r  BooleanArrayIndexer.get_shape      !!rE   c                <    V P                  ^ 4      V P                  3# r   r  r~  s   &rC   r  $BooleanArrayIndexer.get_index_bounds  s     Q++rE   c                2   V P                   pV P                   P                  V P                  V P                  4       V P                   P                  V P                  V P                  4       VP                  V P                  4       VP                  V P                  4       VP                  V P                  4      pVP                  V P                  4      pVP                  VP                  R W P                  4      RR7      ;_uu_ 4        VP                  V P                  4       RRR4       \        V P                  WP                  P                   V P                  V P"                  V4      pVP                  VP%                  V4      4      ;_uu_ 4        VP                  V P&                  4       RRR4       \(        P*                  ! W4      pVP                  WPP                  4       W#3#   + '       g   i     L; i  + '       g   i     LW; i)r  Frs  N)r=   r-  r  r  r   r  r  r  r>   r)  r'  r   r  r!  r   r   r   r   not_r  r	   r,  )rX   r=   r  	cur_countr  
next_counts   &     rC   r  BooleanArrayIndexer.loop_head  sf   ,,499dnn5499djj1t}}%.LL0	LL,	__W00y))L$)  + +NN4;;'+ )LL'::#3#3TZZ
 __W\\$/00NN4<<( 1 ,,W@
j**-##+ + 10s   G3H3H	H	c                   V P                   pVP                  V P                  4       VP                  V P                  4       \        P
                  ! VVP                  V P                  4      4      pVP                  W P                  4       VP                  V P                  4       VP                  V P                  4       R # rY  )r=   r  r  r  r	   r,  r>   r  r-  r  r  r  s   &  rC   r  BooleanArrayIndexer.loop_tail  s    ,,t||$-,,W-4\\$..-IK
j..1t}}%,rE   )r  r  r  r=   r   r   r  r   r   r  r   r  Nr  r  s   @rC   r  r  ]  s2     .3#",
$0- -rE   r  c                   N   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )SliceIndexeri  z 
Compute indices along a slice.
c                    Wn         W n        W0n        W@n        WPn        W`n        Wpn        V P                   P                  \        P                  4      V n
        \        V P                  ^ 4      V n        R# r  )r   r=   r   r  r  r   rI  r   r   r   r  r   r  )rX   r   r=   r   r  r  r   rI  s   &&&&&&&&rC   r  SliceIndexer.__init__  sQ    


||225::>T\\1-	rE   c                   V P                   pVP                  V P                  P                  V P                  4      V n        \        P                  ! V P                  WP                  V P                  4       \        P                  ! WP                  V P
                  4       \        P                  ! WP                  P                  4      V n        \        P                   ! WP"                  4      V n        \        P                   ! WP"                  4      V n        VP)                  4       V n        VP)                  4       V n        R # rY  )r=   rm  r  re   r  dim_sizer,   r;  r   r   rI  r<  r	   
is_neg_intstepis_step_negativerV   r  r  r   r  r  r  r  s   & rC   r  SliceIndexer.prepare  s    ,,--dhhnndhhG##DLL'::$(JJ	0'::t}}= ' 2 27JJOO L((,,?
((,,?
224002rE   c                X    \         P                  ! V P                  V P                  4      # rY  )r,   r>  r=   rI  r~  s   &rC   r  SliceIndexer.get_size  s    ''djjAArE   c                $    V P                  4       3# rY  r  r~  s   &rC   r  SliceIndexer.get_shape  r  rE   c                b    \         P                  ! V P                  V P                  4      w  rW3# rY  )r,   get_slice_boundsr=   rI  )rX   loweruppers   &  rC   r  SliceIndexer.get_index_bounds  s&    //djjI|rE   c           	     B   V P                   pV P                   P                  V P                  P                  V P                  4       V P                   P                  V P
                  V P                  4       VP                  V P                  4       VP                  V P                  4       VP                  V P                  4      pVP                  V P                  4      pVP                  V P                  VP                  R VV P                  P                  4      VP                  RVV P                  P                  4      4      pVP                  VRR7      ;_uu_ 4        VP                  V P                   4       RRR4       W#3#   + '       g   i     Y#3# ; i)z<=r  Frs  N)r=   r-  rI  r=  r  r  r   r  r  r  r>   selectr  r'  stopr)  r  )rX   r=   r  r  is_finisheds   &    rC   r  SliceIndexer.loop_head  s'   ,,4::++TZZ8499djj1t}}%.LL,	LL,	nnT%:%:%,%8%8y9=&J%,%8%8y9=&JK
 __[_77NN4;;' 8## 87##s   %FF	c                   V P                   pVP                  VP                  V P                  4      V P                  P
                  R .R7      pVP                  W P                  4       \        P                  ! WP                  V P                  4      4      pVP                  W0P                  4       VP                  V P                  4       VP                  V P                  4       R# )r   r   N)r=   r  r>   r  rI  r  r-  r	   r,  r   r  r  r  r  )rX   r=   r  r  s   &   rC   r  SliceIndexer.loop_tail  s    ,,[[djj!94::??(-w ! 0
j**-,,Wll4::6NO
j**-t}}%,rE   )r  r   r  r  r=   r   r   r  r  r   r  r  r  rI  r  Nr  r  s   @rC   r  r    s3     	.3B"$$- -rE   r  c                   H   a  ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )FancyIndexeri  z,
Perform fancy indexing on the given array.
c           
        Wn         W n        W0n        \        P                  ! W$P
                  VP                  4      V n        \        P                  ! W$P                  VP                  4      V n        V P                   P                  \        P                  4      V n        . V n        . p\        V Uu. uF  p\        V4      '       g   K  VNK  	  up4      p	^ p
^ p\!        We4       EFX  w  rV\        P"                  J do   VP                  \        V4      ,
          ^,           V	,           p\%        V4       F3  p\'        WW4V
4      pVP)                  V4       V
^,          p
V^,          pK5  	  K  \+        V\        P,                  4      '       d5   VP/                  W-V4      p\1        WW4V
VV4      pVP)                  V4       EMj\+        V\        P2                  4      '       d>   \5        WWV P                  V
,          4      p\7        WV4      pVP)                  V4       EM\+        V\        P8                  4      '       d   \;        V4      ! WV4      p\+        VP<                  \        P2                  4      '       d!   \?        WVVV P                  V
,          4      pM:\+        VP<                  \        P@                  4      '       d   \C        WVV4      pMQ hVP)                  V4       ME\        V4      '       d&   V P                  P)                  V4       V
^,          p
M\E        RV: 24      hV
^,          p
V^,          pEK[  	  WP                  8:  g   Q WP                  34       hWP                  8  d*   \'        WW4V
4      pVP)                  V4       V
^,          p
K9  \        V4      VP                  8X  g   Q \        V4      VP                  34       hWpn#        R# u upi )r   r5  N)$r   r=   r   r	   r   re   rp   r  r   r   r   r   r  newaxesr   r   r   r9  r8   r  ri   r   r:  r  r  r   r   r  r   r~   r   r  Booleanr  AssertionErrorindexers)rX   r   r=   r   r  r   r   r  r   rF  r   new_axrG  r   rH  rm   indexerrI  r   r   s   &&&&&&&             rC   r  FancyIndexer.__init__  s   
**7IIuzzJ++G[[%**M||225::>+J+3S9I33+JK"78OH&!JJW59KG	y)A+Ge"MGOOG,!GBaKF	 *
  %11++GHE&wR',e5(E5==11'%(,B9(3?(E5;;//#E*7XFekk5==991'2726++b/CG  U]];;1'27AG 1(U####F+a$E%KLL!GBaKFQ  9V ZZ1"jj!11::o#Ge"EGOOG$!GB8}

*GS]EJJ,GG* m Ks   3OOc                f   V P                    F  pVP                  4        K  	  V P                  P                  \        P
                  ^4      pV P                    Uu. uF  qP                  4       NK  	  ppV P                   F  pVP                  W34       K  	  \        VR4      V n
        R# u upi )r  Nrr   )r  r  r   r   r   r   r  r  insertsumindexers_shape)rX   rm   rB  	res_shapes   &   rC   r  FancyIndexer.prepare:  s    AIIK  ll''

A6 -1MM:Mq[[]M	: AQ'  ")R0 ;s   B.c                    V P                   # )z/
Get the resulting data shape as Python tuple.
)r!  r~  s   &rC   r  FancyIndexer.get_shapeM  s     """rE   c           	        \        V4      V P                  P                  8X  g   Q hV P                  p\        P
                  pV P                  ^ 4      pV P                  ^4      pTpTp\        V P                  V P                  V4       F  w  rpVP                  VVP                  RW4      4      pV	P                  4       w  rVP                  W4      pVP                  WP                  W4      4      pVP                  RW4      pVP!                  VVP#                  VVV4      4      pVP!                  VVP#                  VVV4      4      pK  	  VP!                  W4      pVP#                  WEV4      pVP#                  WEV4      pWx3# )z
Get a half-open [lower, upper) range of byte offsets spanned by
the indexer with the given strides and itemsize.  The indexer is
guaranteed to not go past those bounds.
==r&  )r   r   rp   r=   r	   	false_bitr  r   r  r!  or_icmp_unsignedr  r   subr'  r  r  )rX   r   r   r=   is_emptyr  rB  r
  r  r  re   stridelower_indexupper_indexlower_offsetupper_offsetis_downwardss   &&&              rC   get_offset_boundsFancyIndexer.get_offset_boundsS  sh    7|tzz...,,$$||All1o&)$--9L9L*1'3"GF{{8#*#8#8u#KMH (/'?'?'A$K";;v;L";;v{{;/LML"..sFALKK '|/;/;!=>E KK '|/;/;!=>E'3& E,xu5xu5|rE   c                @    \        R  V P                   4       !  w  rW3# )c              3   @   "   T F  qP                  4       x  K  	  R # 5irY  )r  )r[  rm   s   & rC   r]  +FancyIndexer.begin_loops.<locals>.<genexpr>z  s     E}!}s   )r   r  )rX   r   countss   &  rC   begin_loopsFancyIndexer.begin_loopsy  s     Et}}EFrE   c                ^    \        V P                  4       F  pVP                  4        K  	  R # rY  )reversedr  r  )rX   rm   s   & rC   	end_loopsFancyIndexer.end_loops}  s    $--(AKKM )rE   )	r   r=   r   r  r!  r  r  r  r   N)rs   rt   ru   rv   r  r  r  r  r3  r9  r=  rx   ry   r  s   @rC   r  r    s0     @!D1&#$L rE   r  c                 R   \         P                  ! WP                  4      p\         P                  ! WP                  4      p	VP                  p
\        WWEWg4      pVP                  4        VP                  pVP                  4       p\        WW4      pVP                  p\         P                  ! VV P                  \        P                  ^ 4      4      pVP                  4       w  pp\         P                  ! WWV	VP                   VRV P"                  R7	      p\%        WVV4      pVP'                  V4      pVP)                  VV.4      p\+        WVVV4       \         P,                  ! VV4      pVP/                  VV4       VP1                  4        \3        WWP5                  4       4      # )r   Fr6  )r	   r   re   r   r   r  r  r  r  _empty_nd_implr  r   r   r   r9  get_item_pointer2layoutrQ  r   r>   gepr   r,  r-  r=  r    r  )r   r=   rZ   r  r   r  r   r   r  r   r   r  out_ty
out_shapesr  out_dataout_idx_rk   r   curnext_idxs   &&&&&&&&              rC   ra  ra    se    !!'995F""7KK8G88D7U&1GOO __F""$J
6
>CxxH''(/(<(<UZZ(KMG $$&JGQ 
#
#GdG$)LL'e070J0JLC GeS
1C ,,w
C
++h
&Cwc2&&w4HMM(G$GfmmoFFrE   c           
        VP                   w  rEVw  rg\        V4      ! WV4      pVP                  ^ 8X  dA   \        WWW4      w  rW\	        WVP
                  WFV3V34      p\        WVP
                  V4      # \        WW#WFV3V34      # )z+
Advanced or basic indexing with an array.
)r  r~   rp   r   rR  r  r   ra  rU  s	   &&&&     rC   fancy_getitem_arrayrL    s    
 88LEHC
U
Gc
2CzzQ$WuB
$Ws%*%C6C 3??CHH Ws"%C6; 	;rE   c           	        VP                   pVP                  ^ 4      pVP                  ^4      pVP                  R9   d!   Tp	VP                  WcP                  4      p
W3# Tp	Tp
\        VP                  4       F  pVP                  W[,          VP                  WK,          V4      4      pVP                  RW4      pVP                  VVP                  W4      V
4      p
VP                  VWP                  W4      4      p	K  	  VP                  W4      p
VP                  RVP                  V4      pVP                  WV
4      p
VP                  WV	4      p	W3# )z
Compute a half-open range [lower, upper) of byte offsets from the
array's data pointer, that bound the in-memory extent of the array.

This mimics offset_bounds_from_strides() from
numpy/core/src/private/mem_overlap.c
CFr  r'  )r   r9   rB  r   r   r8   rp   r+  r'  r  r  )r   r=   arrtyarrr  r   r   r  rB  r
  r  rm   max_axis_offset
is_upwardsr,  s   &&&&&&         rC   offset_bounds_from_stridesrS    s9    ||H==D
))A,C||t Hjj10 <+ uzz"A &kk'**1++fi*EGO ,,T?IJNN:#*;;u#FOENN:#(++e*MOE # E,&&tSZZ>xu5xu5<rE   c                    VP                  WBP                  4      pVP                  WR4      pVP                  WS4      pWg3# )zy
Given [lower, upper) byte offsets and a base data pointer,
compute the memory pointer bounds as pointer-sized integers.
)ptrtointr9   r  )r   r=   r
  r  r   data_ptr_as_intr=  ends   &&&&&   rC   compute_memory_extentsrX    s<    
 &&tZZ8OKK/E
++o
-C:rE   c                :    \        WW#WE4      w  rx\        WWxV4      # )zf
Compute a half-open range [start, end) of pointer-sized integers
which fully contain the array data.
)rS  rX  )	r   r=   rO  rP  r  r   r   r
  r  s	   &&&&&&&  rC   get_array_memory_extentsrZ    s&     .g.4?LE!'E$GGrE   c                j    VP                  VP                  RW%4      VP                  RWC4      4      pV# )zO
Whether two memory extents [a_start, a_end) and [b_start, b_end)
may overlap.
r&  )and_r*  )r   r=   a_starta_endb_startb_endmay_overlaps   &&&&&& rC   extents_may_overlaprb    s:     ,,c72c72K rE   c                 x  a aaaaaaaaaaaa SP                   oR o\        P                  ! SS4      oSoRoSP                  SRR7      ;_uu_ 4        SP	                  VP
                  VP                  4      pS P                  P                  SV4      p	V	P                   oSP                  V	S4      p	SP                  V	S4       S P                  \        P                  4      p
\        P                  ! SSV
4      ;_uu_ 4       p\        P                  ! S SSSSSP                   V4      p\        P                  ! S SV	SSSV4      pSP                  SP#                  V4      V4       RRR4       RRR4       VV VVVVVVVVVV3R lpVV VVV3R lpW3#   + '       g   i     L6; i  + '       g   i     LA; i)r   NFrs  c                 `  < \         P                  ! SS
4      pSP                  SR R7      ;_uu_ 4       w  r#V;_uu_ 4        SP                  \         P                  ! SSSP                  S4      SS	SV R R7      V4       RRR4       V;_uu_ 4        SP                  \         P                  ! SSSSSSP                  V R R7      V4       RRR4       RRR4       \        SSSSP                  V4      4      #   + '       g   i     L; i  + '       g   i     LH; i  + '       g   i     LS; i)Frs  r7  N)r	   rV   if_elser-  rA  r>   rB  r   )source_indicessrc_ptrif_copy	otherwiser=   r   	copy_datacopy_layoutcopy_shapescopy_stridesptrtysrc_data
src_shapessrc_stridessrctyuse_copys   &   rC   src_getitem&maybe_copy_source.<locals>.src_getitem-  s    %%gu5__Xe_448L--gw.5ll9.E.9<.9>9>	@
   --gw.8+.3llN9>@   5  '5',,w2GHH   54s;   D>C7	?D9D
	
D7DD
DDD-	c                     < SP                  SR R7      ;_uu_ 4        SP                  S4      p SP                  V S4      p SP                  P	                  SV 4       RRR4       R#   + '       g   i     R# ; i)Frs  N)r)  r>   bitcastr
  free)r   r=   r   rk  rt  	voidptrtys    rC   src_cleanup&maybe_copy_source.<locals>.src_cleanupA  sW    __Xe_44<<	*D??43DKKWd+ 5444s   A A''A8	)r9   r	   r  r)  r   r   r   r
  allocaterx  r-  r   r   r   	loop_nestrA  rB  r>   )r   r=   rt  rs  srcrq  rr  rp  	allocsizer   r   r   rh  dest_ptrru  r{  rk  rl  rm  rn  ro  rz  s   ffff&fff        @@@@@@rC   maybe_copy_sourcer    sj   MMEK))'8<IKL	%	0	0 KKcjj9	{{##GY7II	tU+dI& ''

3w
F;;w//(0:K05gGG 00'41<l1<gGH MM',,w/: < 
1,I I I(, , ##I <; 
1	0s&   B2F)A$F	(F)F&!F))F9	c                8   V P                  \        P                  ^ 4      pV P                  \        P                  ^4      p\        V4      \        V4      8  dA   \        V4      \        V4      ,
          pV.V,          V,           pV.V,          V,           pW#3# \        V4      \        V4      8  d   \        V4      \        V4      ,
          pVRV  Uu. uF  pVP	                  RW4      NK  	  p	p\
        P                  ! VP                  V	\        P                  4      p
VP                  VP                  V
4      RR7      ;_uu_ 4        RpV P                  P                  V\        V34       RRR4       W'R pW7R pW#3# u upi   + '       g   i     L ; i)aI  
Preprocess dimension for broadcasting.
Returns (shapes, strides) such that the ndim match *target_shape*.
When expanding to higher ndim, the returning shapes and strides are
prepended with ones and zeros, respectively.
When truncating to lower ndim, the shapes are checked (in runtime).
All extra dimension must have size of 1.
Nr'  Frs  z,cannot broadcast source array for assignment)r   r   r   r   r*  	functoolsreducer\  r	   true_bitr)  r  ru  rv  r   )r   r=   r  r   target_shaper  rB  nd_diffrJ  
dim_is_oneacceptedr   s   &&&&&       rC   _bc_adjust_dimensionr  K  sl    Q/D


u{{A
.C <3v;&l#c&k16)&7"W," ? 
\	S[	(f+L 11 &x 02 0" ++D": 0 	 2##GLL*$+$4$46 __W\\(3E_BB@C--gzC6J C !(#?2
 CBs   F%F		F	c           
        . p. pV P                  \        P                  ^ 4      pV P                  \        P                  ^4      p\        WB4       U	U
u. uF  w  rVP	                  RW4      NK  	  pp	p
V U
u. uF  qP	                  RW4      NK  	  pp
\        W4       UUu. uF  w  rVP                  W4      NK  	  ppp\        WV4       UU	U
u. uF  w  prVP                  VW4      NK  	  pp	pp
\        W4       UU
u. uF  w  pp
VP                  VWz4      NK  	  ppp
WV3# u up
p	i u up
i u uppi u up
p	pi u up
pi )z
Broadcast shapes and strides to target_shape given that their ndim already
matches.  For each location where the shape is 1 and does not match the
dim for target, it is set to the value at the target and the stride is
set to zero.
rr  r'  )r   r   r   r   r'  r\  r  )r   r=   r  r   r  	bc_shapes
bc_stridesr  rB  taroldmismatch
src_is_onexypredsps   &&&&&            rC   _bc_adjust_shape_stridesr  p  sB    IJQ/D


u{{A
.C !$L 9; 9HC ##D#3 9  ;AGH#%%dC5JH,/,EF,EDAW\\!,EEF$'V$DF$D[Q 3,$D  F !$E 35 3fa ..D. 3  5  ;HFF5s   D$7D*!D/D5 D<c           
        \         P                  ! WP                  4      p\         P                  ! WP                  4      p\	        WWVV4      w  rV\        WVWd4      w  rVVP                  \        V4      RR7      p\        V4      ! W4      p\        VVP                  \         P                  ! W4      \         P                  ! W4      VP                  VP                  VP                  R7       Wx3# )zL
Broadcast the given array to the target_shape.
Returns (array_type, array)
Arp   rB  rN  )r	   r   re   r   r  r  copyr   r~   r   r   rj   r   r   r   )	r   r=   arrtyperP  r  r  r   new_arrtypenew_arrs	   &&&&&    rC   _broadcast_to_shaper    s     !!'995F""7KK8G*7V+79OF.w/6FOF,,C$5c,BK%g7G7 ++G<"--g?LL;;**& rE   c                 Z    VP                  VP                  R RR7      pV! W4      pR pWE3# )r  T)rp   rB  readonlyc                 j   Vw  rEVP                   ^ ,          p\        V4      ! WV4      p\        P                  ! W4      p\	        WWdV4      w  rx\        VR\        V P                  VP                  P                  R4      4      R4      4       VP                  4       p	\        WVP                  V	4      # )r   r   N)r  r~   r	   r   r  r   r   r   r   r   r  r   r  )
r   r=   rZ   r  r  shape_rs  rH  destr  s
   &&&&      rC   codegen$_numpy_broadcast_to.<locals>.codegen  s    #6%%g6%gFL 	h&&t'?'?'IJ! 	 nn 3??CHHrE   )r  r   )	typingctxr   re   retrZ   r  s   &&&   rC   _numpy_broadcast_tor    s4    
**%++cD*
AC
e
CI <rE   c                 B    VP                  R R7      pV! V4      pR pW43# )Tr  c                     Vw  pVP                   ^ ,          p\        V4      ! WV4      p\        P                  ! VP                  P
                  4      Vn        VP                  4       p\        WVP                  V4      # r   )	r  r~   r	   get_null_valuer   r9   r  r   r  )r   r=   rZ   r  r  rs  r  r  s   &&&&    rC   r  #get_readonly_array.<locals>.codegen  sb    % 37,,T[[-=-=>nn 3??CHHrE   )r  )r  rP  r  rZ   r  s   &&   rC   get_readonly_arrayr    s-     ((D(
!C
c(CI <rE   c                 :   V P                   p\        V4      p\        V4      pW48  d   \        R 4      hV F  pV^ 8  g   K  \        R4      h	  ^ pWC,
          pWc8  d=   W&,          pW,          p	W8X  g   V^8X  d   V^,          pV^,          pK7  \        R4      hR# )zDinput operand has more dimensions than allowed by the axis remappingz4all elements of broadcast shape must be non-negativez=operands could not be broadcast together with remapped shapesN)re   r   r   )
r   
dest_shape	src_shapesrc_ndim	dest_ndimr   	src_index
dest_indexsrc_dimdest_dims
   &&        rC   _can_broadcastr    s    I9~HJI 1 2 	2!8 , - -  I%J

&) 'Q,NI!OJ 4 5 5 rE   c                 Z    \         P                  ! V 4      p \        W4       \        W4      # rY  )npasarrayr  r  r   re   s   &&rC   _default_broadcast_to_implr    s#    JJuE5 u,,rE   c           	         \        V 4      '       g   \        P                  ! R 4      h\        V\        P
                  4      '       d   R pV# \        V\        P                  4      '       dI   \        VP                  \        P
                  4      '       g   Rp\        P                  ! V4      h\        # \        V\        P                  4      '       dm   VP                  ^ 8  d\   \        V Uu. uF  p\        V\        P                  4      NK  	  up4      '       g   RV R2p\        P                  ! V4      h\        # \        V\        P                  4      '       dy   VP                  ^ 8X  dh   \        V \        P                  4      ;'       d    V P                  ^ 8H  p\        V 4      '       g	   V'       d   R pV# Rp\        P                  ! V4      hRV,          p\        P                  ! V4      hu upi )z-The first argument "array" must be array-likec                 0    \         P                  ! W34      # rY  )r  broadcast_tor  s   &&rC   r    numpy_broadcast_to.<locals>.impl  s    ??5(33rE   z7The second argument "shape" must be a tuple of integers"z," object cannot be interpreted as an integerc                 D    \         P                  ! V 4      p \        V 4      # rY  )r  r  r  r  s   &&rC   r   r    s     

5))%00rE   z/Cannot broadcast a non-scalar to a scalar arrayz:The argument "shape" must be a tuple or an integer. Got %s)r   r   r   r   r   r   UniTupler   r  Tupler   allIntegerLiteralr   rp   r   )r   re   r   r   typis_scalar_arrays   &&    rC   numpy_broadcast_tor    s   E""   "1 2 	2 %''	4	E5>>	*	*%++u}}55KC$$S))))	E5;;	'	'EKK!OUKUcJsE$8$89UKLLeWHIC$$S))))	E5;;	'	'EKK1,<$UEKK8LLUZZ1_%  O1
 K DC$$S))   %%+ Ls   /#G8c                 
   \        \        V4      4       Fj  pV\        V4      ,
          V,           pW#,          pV^ 8  d   \        R4      hV^8X  d   K?  W,          ^8X  d   WPV&   KR  W,          V8w  g   Ka  \        R4      h	  R# )r   #negative dimensions are not allowedz=shape mismatch: objects cannot be broadcast to a single shapeN)r8   r   r   )rmre   rm   r   tmps   &&&   rC   numpy_broadcast_shapes_listr    sv    3u:E
NQh7BCC!8419aDTS[ 2 3 3 rE   c                    aa	 \        V 4       F  w  r\        V\        P                  4      p\        V\        P                  4      ;'       d%    \        VP
                  \        P                  4      p\        V\        P                  4      ;'       d    \        VP                  4      ^ 8H  pV'       d   K  V'       d   K  V'       d   K  RV RV 2p\        P                  ! V4      h	  ^ oV  Fh  p\        V\        P                  4      '       d   \        S^4      oK1  \        V\        P                  4      '       g   KS  \        S\        V4      4      oKj  	  S^ 8X  d   R # RS,          o	VV	3R lpV# )r   z	Argument z* must be either an int or tuple[int]. Got c                      R# r  rr   r  s   *rC   <lambda>+ol_numpy_broadcast_shapes.<locals>.<lambda>B  s    RrE   c                  :  < ^.S,          pSp\        V 4       F^  p\        V\        4      '       d    \        V4      ^ 8  d   \	        VSV4       K8  \        V\
        4      '       g   KP  \	        VSV34       K`  	  \        V4       F  w  rE\        W$V4      pK  	  V# r  )r   r   r   r   r  r   r   r/   )r  r  rc  argr   elemr  tup_inits   *     rC   r   'ol_numpy_broadcast_shapes.<locals>.implF  s    aAC%d+c5))c#hl/1c:S))/1sf=	 ,
 'q\	#Cd3 *JrE   r  )r   r   r   r   r  r   r  r   r   r   maxrf  )
r  r   r  is_intis_int_tupleis_empty_tupler   r   r  r  s
   *       @@rC   ol_numpy_broadcast_shapesr  ,  s!    dOC/!#u~~6 1 1syy%--0 	#C5MM#cii.A:M,,..se $ C$$S)) $ 	
Ac5==))Aq	AU__--As3x A	  	Av!8	 rE   c                    aa \        V 4       F0  w  r\        V4      '       d   K  \        P                  ! R V R24      h	  RpRpV  Fi  p\	        V\
        P                  \
        P                  34      '       d   VP                  pMTpVf   TpKJ  W48w  g   KR  \        P                  ! RV  24      h	  ^ o\        V 4       F  w  r\	        V\
        P                  4      '       d   \        SVP                  4      oK=  \	        V\
        P                  \
        P                  \
        P                  34      '       d   \        S^4      oK  \        P                  ! RV 24      h	  RS,          oVV3R lpV# )z
Argument "z" must be array-likeNzTMismatch of argument types. Numba cannot broadcast arrays with different types. Got zUnhandled type c                  ~  < ^.S,          p\        V 4       F.  p\        VS\        P                  ! V4      P                  4       K0  	  Sp\        S4       F  p\        W4W,          4      pK  	  . p\        V 4       F=  pVP                  \        P                  ! \        P                  ! V4      V4      4       K?  	  V# r  )	r   r  r  r  re   r8   r/   ri   r  )r  re   r   rc  rm   outsr  r  s   *     rC   r   $numpy_broadcast_arrays.<locals>.implx  s    
 a#D)E'q"**U2C2I2IJ * qA1C  #D)EKK

5(93?@ *rE   r   )r   r   r   r   r   r   r   rf  r   ArrayCompatibler  rp   Numberr  )r  r   r  unified_dtypedtr   r  r  s   *     @@rC   numpy_broadcast_arraysr  U  sH    dO$$$$z# 75 &5 6 6 $
 M	BcEKK9::BB M $$ &,,06&3 4 4  	
AdOc50011Asxx AellEMM5??KLLAq	A$$se%<== $ axH( KrE   c                    \         h)zTargets should implement this if they wish to specialize the error
handling/messages. The overload implementation takes two tuples as arguments
and should raise a ValueError.r   rq  index_shapes   &&rC   raise_with_shape_contextr    
     rE   generic)targetc                 &   \        V \        P                  4      '       dq   \        V\        P                  4      '       dO   V P                  VP                  8X  d2   \        V P                  \        P                  4      '       d   R  pV# R# R# R# R# )c                     \        R 4      h)z0cannot assign slice from input of different sizer   r  s   &&rC   r   1ol_raise_with_shape_context_generic.<locals>.impl  s    OPPrE   Nr   r   r  r   r   rq  r  r   s   && rC   #ol_raise_with_shape_context_genericr    sp     	:u~~..;//K---z''77	Q	 8 	. 	0 	/rE   CPUc                 &   \        V \        P                  4      '       dq   \        V\        P                  4      '       dO   V P                  VP                  8X  d2   \        V P                  \        P                  4      '       d   R  pV# R# R# R# R# )c           	      l   \        V 4      ^8X  d   RV ^ ,           R2pM.RRP                  V  Uu. uF  p\        V4      NK  	  up4       R2p\        V4      ^8X  d   RV^ ,           R2pM.RRP                  V Uu. uF  p\        V4      NK  	  up4       R2pRV RV 2p\        V4      hu upi u upi )r  (z,), )zcannot assign slice of shape z from input of shape )r   joinstrr   )rq  r  	shape_strr  	index_strr   s   &&    rC   r   -ol_raise_with_shape_context_cpu.<locals>.impl  s    :!#
1b1			:*F:a3q6:*F GHJ	;1$A/r2			;*G;a3q6;*G HIK	29+ >%;(CS/! +G +Hs   B,
;B1
Nr  r  s   && rC   ol_raise_with_shape_context_cpur    so    :u~~..;//K---z''77	"  8 	. 	0 	/rE   c                  a aa(a)a* VP                   w  rgo*Vw  ro(\        V4      ! S SV4      p\        P                  ! SVP                  4      p	\        P                  ! SVP
                  4      p
VP                  p\        S SWhWE4      pVP                  4        R p\        S*\        P                  4      '       Ed   S*P                  o)VP                  4       p\        S*4      ! S SS(4      o(\        S SS*S(V4      w  o*o(\        P                  ! SS(P                  4      p\        P                  ! SS(P
                  4      pS(P                  p\        P                  p\!        V4      \!        V4      8X  g   Q h\#        W4       F)  w  ppSP%                  VSP'                  RVV4      4      pK+  	  SP)                  VRR7      ;_uu_ 4        V! S SVV4       RRR4       \+        S SS*S(VVV4      w  ppVP-                  V
VP.                  4      w  pp\1        S SVVV4      w  pp\3        S SVVVV4      p\5        S SVS*S(VVV4      w  ppM\        S*\        P6                  4      '       d   S*P                  o)VP                  4       p\!        V4      ^8X  g   Q hS P9                  \         \;        \        P<                  S*4      4      pV! SS(34      pSP'                  RV^ ,          V4      pSP)                  VRR7      ;_uu_ 4        V! S SV3V^ ,          34       RRR4       VV V(V)V*3R lpR pMS*o)V(3R lpR	 pS P?                  \        P@                  ^ 4      p VPC                  4       w  p!p"\E        V"4      p"VPF                   F  p#V"PI                  V#V 4       K  	  V" U$u. uF  p$V$f   K	  V$NK  	  p%p$V! V%4      p&S PK                  SV&S)VP                  4      p&\        PL                  ! S SVWVPN                  V!RS PP                  R
7	      p'\S        S SVV&V'4       VPU                  4        V! 4        S PW                  4       #   + '       g   i     ELu; i  + '       g   i     ELF; iu up$i )z
Implement slice assignment for arrays.  This implementation works for
basic as well as fancy indexing, since there's no functional difference
between the two for indexed assignment.
c           	         V P                   P                  \        4      p\        P                  ! \        P
                  \        V4      4      \        P                  ! \        P
                  \        V4      4      3pVP                  V P                   V/ 4      pV P                  WF4      pV! WP                  WP                  ^ ,          V4      V P                  WP                  ^,          V4      34       R# r  )typing_contextresolve_value_typer  r   r  int64r   get_call_typerP   
make_tupler  )r   r=   rq  r  fntyargtys	raise_sigfuncs   &&&&    rC   raise_shape_mismatch_error2fancy_setslice.<locals>.raise_shape_mismatch_error  s     %%88$&..c*o>..c+.>?A&&w'='=vrJ	##D4W))'>>!3D*46))'>>!3D*578 	9rE   rr  Frs  Nc                    < V w  pSP                  \        P                  \        SS\        P
                  4      4      pV! SSV34      # rY  )rP   operatorgetitemr#   r   r   )rg  r   getitem_implr=   r   r  	src_dtypers  s   &  rC   ru  #fancy_setslice.<locals>.src_getitem  sF    !DC"//  )UEJJ7L  #s44rE   c                      R # rY  rr   rr   rE   rC   r{  #fancy_setslice.<locals>.src_cleanup      rE   c                    < S# rY  rr   )rg  r  s   &rC   ru  r  $  s    JrE   c                      R # rY  rr   rr   rE   rC   r{  r  '  r  rE   r6  ),r  r~   r	   r   re   r   r   r  r  r   r   r  r   r  r  r(  r   r   r)  r'  r)  rZ  r3  r   rX  rb  r  SequencerP   r#   r   r   r   r9  r   r  r  r   rA  rB  rQ  r   r=  ry  )+r   r=   rZ   r  r   r   r   rH  r  dest_shapesdest_strides	dest_datar  r  r  rq  rr  rp  shape_errorur   	src_startsrc_end
dest_lower
dest_upper
dest_startdest_endrt  ru  r{  len_implseq_lenr  dest_indicesr8  rm   r  rg  r   r  r  r  rs  s+   ff&&&&                                  @@@rC   rh  rh    s    hhOEeKCC
U
GWc
2C&&w		:K''=LI7GU&1GOO9 %&&KK	'')#6('5#)46
s))'399=
**7CKK@88 '';3z?222
0DAq!++k&-&9&9$1&EGK 1 __[_77&w'24 8
 6gw69:6A8M	7 ")!:!:<;><<"I
J5gw6@*6? A
H 'wG'18= $5Wgx5:C5@($L [ 
E5>>	*	*KK	 '');1$$$''Yuzz5-IJ7SF+))$AH__[_77&w'(3A'8: 8	5 	5	 			 Q/D"..0L& &\F
 __a  "(9A1aaN9
n
%C ,,wY
<C (('9)4).|495<5O5O	QH
 wX6M""$$A 877B 877V :s$   
QQ!Q*,Q*Q	Q'	c           
         VP                   ^ ,          pVP                   R,          pV^ ,          pVR,          p\        WW4       UU	u. uF&  w  rV P                  WV\        P                  4      NK(  	  ppp	\
        P                  ! WV^ ,          P                  4      p
\        P                  ! \        P                  \        V4      R7      p\        P                  ! VP                  WK4      pWj3pW3# u up	pi )r   r  r   r   )r  r   r   r   r   r	   rj   r9   r  r   r   r#   r  )r   r=   rZ   r  r   dimtysr  rl   r\  r   re   shapetynew_signew_argss   &&&&          rC   vararg_to_tupler0  U  s    HHQKEXXb\F
q'C8D v,., LLr5::6, 	 . wd1gll;Enn5::SY?Gs?GzH.s   ,C4zarray.transposec                 L    \        WVP                  ^ ,          V^ ,          4      # r   )array_Tr  r   r=   rZ   r  s   &&&&rC   array_transposer4  h  s    7SXXa[$q'::rE   c                     \        V 4      \        \        V 4      4      8w  d   \        R 4      h\        V4      pV  F$  pWC8  g   \        V4      V8  g   K  \        R4      h	  W,          VR&   W ,          VR&   R# )zrepeated axis in transposez2axis is out of bounds for array of given dimensionNNNN)r   r   r   abs)r   re   r   r  r  s   &&&  rC   permute_arraysr8  m  sn    
4yCD	N"566
e*C8s1v| / 0 0 
 {E!HGAJrE   c           
         VP                   ^ ,          p\        V4      ! WV^ ,          4      pVP                   ^,          V^,          rvVP                  VP                  rV P	                  \
        P                  4      p
\        P                  ! W4      pWuP                  VP                  .pV Uu. uF  p\        P                  ! W4      NK  	  pp\        W4       F  w  ppVP                  VV4       K  	  \
        P                  ! V	^RR7      pV P!                  \
        P                  V P#                  V
4      4      pV Uu. uF  p\        V4      ! W4      NK  	  pp\        VV4       FU  w  pp\%        VVP'                  VV
P)                  4       4      V P!                  \
        P                  V4      .V.VRR7       KW  	  T P+                  T\,        \.        P0                  ! \
        P2                  VVV4      V Uu. uF  pVP5                  4       NK  	  up4       \        VP6                  4      ! W4      p\%        VVP8                  VP;                  V^,          4      VP;                  V^,          4      VP<                  VP>                  VP@                  R7       VP5                  4       p\C        WVP6                  V4      # u upi u upi u upi )r   r   r   rp   rB  Nr   re   r   r   r   rN  )"r  r~   r   r   r   r   r   r   	ArrayTypere   r   r	   rV   r   r-  r   r   r   r   rx  
as_pointercompile_internalr8  r   r#   voidr  r  r   r>   r   r   r   r   )r   r=   rZ   r  r   r  axistyr   num_axisr   r  ll_ary_sizearysrH  ll_arysr  dst	np_ary_tynp_itemsizenp_arysnp_aryll_aryar  r  s   &&&&                     rC   array_transpose_tuplerL  |  sH   HHQKE
U
Gd1g
6C88A;QDllFLLe$$UZZ0G,,w1K ))S[[)DBFG$Qw""78$GG &Sc3 ' %a<I&&uzz'.'='=g'FHK AEE1z)$W6GE gw/v#OOFG4F4F4HI%225::xHI +} +#	% 0 Wn#--ejj.7IO5<=WakkmW=? S__
%g
7C3 gaj1"<<
3LL;;**& --/CWsDDO H F  >s   0KK Kc                 6    \        WW#4      w  rE\        WWE4      # rY  )r0  rL  r   r=   rZ   r  r.  r/  s   &&&&  rC   array_transpose_varargrO    s    '#DG 7EErE   c                     \        V \        P                  4      '       d   \        P                  ! R 4      hVf   RR lpV# RR lpV# )z#np.transpose does not accept tuplesc                 "    V P                  4       # rY  	transposerK  axess   &&rC   np_transpose_impl*numpy_transpose.<locals>.np_transpose_impl  s    ;;= rE   c                 $    V P                  V4      # rY  rR  rT  s   &&rC   rV  rW    s    ;;t$$rE   rY  )r   r   rf  r   r   )rK  rU  rV  s   && rC   numpy_transposerY    sD    !U__%%  !FGG|	! 	% rE   Tc                 @   VP                   ^8:  d   TpM\        V4      ! WV4      p\        V4      ! W4      p\        P                  ! WP                  VP                   4      p\        P                  ! WP
                  VP                   4      p\        VVP                  \        P                  ! WRRR1,          4      \        P                  ! WRRR1,          4      VP                  VP                  VP                  R7       VP                  4       p\        WW$4      # )r  NrN  )rp   r~   r	   r   re   r   r   r   rj   r   r   r   r  r   )	r   r=   r  r%  r  r  r  r  r   s	   &&&&     rC   r2  r2    s    
xx1}og6og/%%gyy#((C&&wSXXFsHH$//"F&11'4R4=I #"{{!jj	* mmoWs88rE   c                 `   \        V \        P                  4      '       g   \        P                  ! R 4      h\        V\        P                  4      '       g   \        P                  ! R4      h\        V\
        \        P                  34      '       g   \        P                  ! R4      hRR lpV# )z+The first argument "start" must be a numberz+The second argument "stop" must be a numberz+The third argument "num" must be an integerc                 ^    \         P                  ! WV4      p\         P                  ! R V4      # )g      $@)r  linspacepower)r=  r  numr  s   &&& rC   r   numpy_logspace.<locals>.impl  s#    KKS)xxa  rE   2   )r   r   r  r   r   r   r   )r=  r  ra  r   s   &&& rC   numpy_logspacere    s|    eU\\**  !NOOdELL))  !NOOcC/00  !NOO! KrE   c                 `  a \        V \        P                  4      '       g   R p\        P                  ! V4      h\        V\        P                  4      '       g   Rp\        P                  ! V4      h\        V\
        \        P                  34      '       g   Rp\        P                  ! V4      h\        ;QJ d    R W3 4       F  '       g   K   RM	  RM! R W3 4       4      '       d>   \        \        P                  ! \        V 4      \        V4      R4      4      oR	V3R llpV# R	R lpV# )
z%The argument "start" must be a numberz$The argument "stop" must be a number%The argument "num" must be an integerc              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  r   r   Complexr[  r  s   & rC   r]  "numpy_geomspace.<locals>.<genexpr>       
C]c:c5==))]r_  TFNc                   < V ^ 8X  g   V^ 8X  d   \        R4      hS	! V 4      p S	! V4      p\        R8  d   V P                  ^ 8H  VP                  ^ 8H  ,          p\        P                  ! V 4      R8H  \        P                  ! V4      R8H  ,          p^pV'       d   V P
                  p VP
                  pRpV'       d
   V ) p V) pV) pM&\        P                  ! V 4      pW,          p W,          p\        P                  ! V 4      p\        P                  ! V4      p\        P                  ! WgV4      pV^ 8  d   W^ &   V^8  d   WR&   WX,          # )r   &Geometric sequence cannot include zeroy              ?   r   r\  )r   r   realr  signimaglog10logspace)
r=  r  ra  both_imaginaryboth_negativeout_signlogstartlogstopr.  result_dtypes
   &&&      rC   r   numpy_geomspace.<locals>.impl  s   zTQY !IJJ 'E%Dv%"'**/dii1n!E!#2!5"''$-2:M N!!JJE99D!H "FE 5D (yH775>! xxHhhtnG[[C8F Qw!q	7!%2J$$rE   c                    V ^ 8X  g   V^ 8X  d   \        R4      h\        P                  ! V 4      R8H  \        P                  ! V4      R8H  ,          p^pV'       d
   V ) p V) pV) p\        P                  ! V 4      p\        P                  ! V4      p\        P                  ! WVV4      pV^ 8  d   W^ &   V^8  d   WR&   WG,          # )r   ro  r\  )r   r  rs  ru  rv  )r=  r  ra  rx  ry  rz  r{  r.  s   &&&     rC   r   r}  !  s    zTQY !IJJWWU^r1bggdmr6IJMHu$9xxHhhtnG[[C8F Qw!q	7!%2J$$rE   rc  )r   r   r  r   r   r   r   r`  r   r  result_typer   )r=  r  ra  r   r   r|  s   &&&  @rC   numpy_geomspacer    s    eU\\**5  %%dELL))4  %%cC/005  %%
s
Ce]
Csss
Ce]
CCC!"..%19$#G H 	%p K+	%* KrE   c                 B   \        V\        \        P                  34      '       g   \        P
                  ! R 4      h\        V \        P                  4      '       g   \        P
                  ! R4      hV P                  ^8  d   \        P                  ! R4      hRR lpV# )z*The second argument "k" must be an integerz'The first argument "m" must be an arrayInput must be >= 2-d.c                 n   V^,          pV^ 8X  d
   V R,          # V^8X  d-   \         P                  ! \         P                  ! V 4      ^ ^4      # V^8X  d+   \         P                  ! \         P                  ! V 4      4      # V^8X  d-   \         P                  ! \         P                  ! V ^ ^4      4      # \        h)   r6  )r  swapaxesfliplrflipudr  )r  r   s   &&rC   r   numpy_rot90.<locals>.implD  s    E6Q4K!V;;ryy|Q22!V99RYYq\**!V99R[[Aq122  rE   r  )	r   r   r   r   r   r   r   rp   NumbaValueError)r  r   r   s   && rC   numpy_rot90r  9  sx     a#u}}-..  !MNNa%%  !JKKvvz$$%<==! KrE   c                   V P                  \        P                  4      pVP                  4       pV P                  \        P                  4      p	\
        P                  ! V	WxVWxVWy.4      p
\        P                  ! VP                  V
R4      pV! VP                  4      p\        P                  ! WP                  R4      ^ ^ 4      p\        P                  ! WP                  R4      ^ ^ 4      pV! V4      p\        P                  ! W^ ^ 4      p\        P                  ! W^ ^ 4      pV	! ^ 4      pVP                  WWWEVVP                  V.4      pV# )z
Call into Numba_attempt_nocopy_reshape() for the given array type
and instance, and the specified new shape.

Return value is non-zero if successful, and the array pointed to
by *newstrides* will be filled up with the computed results.
numba_attempt_nocopy_reshapere   r   )r   r   r   r=  intcr   FunctionTyper	   get_or_insert_functionr:   rp   rh   rg   callr   )r   r=   r   r  newndnewshape
newstridesr  ll_intp_starll_intcr
  fnndre   r   
is_f_orderr  s   &&&&&&&          rC   _attempt_nocopy_reshaper  T  s1    $$UZZ0G%%'L$$UZZ0G??7||% D 
	'	'(F
HB 
	B  *>*>w*GANE""7,@,@,K#$a)GENE##Gq!<H%%g1a@JJ
,,r!ZLL*6 7C JrE   c                 8   ^ p^p\        V4       F!  w  rEV^ 8  d   V^,          pTpK  W5,          pK#  	  V^ 8X  d   W8w  d   \        R4      hR# V^8X  d<   V^ 8X  d	   ^ pV ^ 8H  pMW,          pW,          ^ 8H  pV'       g   \        R4      hWqX&   R# \        R4      h)r   z)total size of new array must be unchangedzmultiple negative shape valuesN)r   r   )	origsizere   num_neg_value
known_sizer   r   neg_axinferredoks	   &&       rC   normalize_reshape_valuer  x  s    MJ5!q5QMFOJ " !HII " 
!	?HQB-H&!+BHII f 9::rE   zarray.reshapec           
      .   VP                   ^ ,          pVP                  pVP                   ^,          pV^,          pV P                  \        P                  4      p\
        P                  ! WP                  4      p	\        V4      ! WV^ ,          4      p
\        P                  ! W4      pVP                  W{4       \        P                  ! VP                  ^RR7      p\        V4      ! W4      pV P                  \        P                  V P                  V4      4      p\!        VVP#                  WP%                  4       4      V P                  \        P                  VP                  4      .V.VRR7       V
P&                  pV P)                  V\*        \,        P.                  ! \        P0                  \        P2                  V4      WP5                  4       .4       VP                  p\        P                  ! W4      p\7        WWJVVV4      pVP9                  RVVP;                  ^ 4      4      pVP=                  V4      ;_uu_ 4        RpV P>                  PA                  V\B        V34       RRR4       \        V4      ! W4      p\!        VV
PD                  VPG                  V4      VPG                  V4      V
PH                  V
PJ                  V
PL                  R7       VP5                  4       p\O        WVP                  V4      #   + '       g   i     L; i)r   r   r:  Nr;  r'  zincompatible shape for arrayrN  )(r  r  r   r   r   r   r<  r   r~   r	   rV   r-  r   r   r   r   r   rx  r=  r   r>  r  r   r#   r?  r   r  r  r*  r9   r)  ru  rv  rQ   r   r>   r   r   r   r   )r   r=   rZ   r  r   rettyr-  re   r  ll_shaper  r  shape_ary_ty	shape_aryshape_itemsizer   r  r  r  failr   r  r  s   &&&&                   rC   array_reshaper    s^   HHQKEOOEhhqkGGE$$UZZ0G||G]]3H
U
Gd1g
6C ""75HMM%" ;;W]]3GL<(:I))%***1*@*@*IKN92D2D2FG!..uzz7==IJ*+*! ::D W&=#--ejj.3kk<I"$7$7$9:< MME$$W7J	 5u!):
7B  r2771:6D			,))'3FO 
 U
G
-C3 h/"<<
3LL;;**& --/CWsDD 
	s   %LL	c                 6    \        WW#4      w  rE\        WWE4      # rY  )r0  r  rN  s   &&&&  rC   array_reshape_varargr    s    '#DG7==rE   c                     R  pV# )c                 $    V P                  V4      # rY  reshape)rK  r  s   &&rC   np_reshape_impl#np_reshape.<locals>.np_reshape_impl  s    99X&&rE   rr   )rK  r  r  s   && rC   
np_reshaper    s    	'rE   c                     R  pV# )c                 $    V P                  V4      # rY  r  )rK  re   s   &&rC   r  r    s    99U##rE   rr   )rK  re   r  s   && rC   r  r    s    	$rE   c                 b   \        V 4      '       g   R p\        P                  ! V4      h\        V\        P
                  4      '       d+   \        VP                  \        P                  4      '       g9   \        V\        P                  4      '       g   Rp\        P                  ! V4      hR pV# )#The argument "a" must be array-likezBThe argument "new_shape" must be an integer or a tuple of integersc                 n   \         P                  ! V 4      p \         P                  ! V 4      p \        V\        4      '       d=   ^p\         P                  ! V4       F  pW#,          pV^ 8  g   K  Rp\        V4      h	  MV^ 8  d   Rp\        V4      hTpV P                  ^ 8X  d0   \         P                  ! V4      P                  V P                  4      # V) V P                  ,          ) pT p\        V^,
          4       F  p\         P                  ! Wp34      pK  	  VRV p\         P                  ! Wq4      # )r  z0All elements of `new_shape` must be non-negativeN)r  r  ravelr   r   r   r   zerosastyper   r8   concatenater  )	rK  	new_shapenew_size
dim_lengthr   msg2repeatsr  rm   s	   &&       rC   r   numpy_resize.<locals>.impl  s    JJqMHHQKi''H jj3
&>LC$S/)	 4 1}I && H66Q;88I&--agg66I'(w{#A..#*C $)8nzz#))rE   )r   r   r   r   r   r  r   r   )rK  r  r   r   s   &&  rC   numpy_resizer    s     A3  %%	5>>22	77y%--00%  %%*8 KrE   c                 H   \        V 4      '       g   \        P                  ! R 4      h\        V4      '       g   \        P                  ! R4      h\        V4      '       d   RR lpV# \	        V\
        P                  4      '       g   \        P                  ! R4      hRR lpV# )z+The first argument "arr" must be array-likez/The second argument "values" must be array-likec                     \         P                  ! \         P                  ! V 4      4      p \         P                  ! \         P                  ! V4      4      p\         P                  ! W34      # rY  )r  r  r  r  rP  valuesr   s   &&&rC   r   np_append.<locals>.impl%	  s@    ((2::c?+CXXbjj01F>>3-00rE   z,The third argument "axis" must be an integerc                 4    \         P                  ! W3VR 7      # r   r  r  r  s   &&&rC   r   r  /	  s    >>3-d;;rE   rY  )r   r   r   r   r   r   r   )rP  r  r   r   s   &&& rC   	np_appendr  	  s     C    !NOOF##   ". / 	/ 4	1 K $..$$ &/ 0 0	<KrE   zarray.ravelc                     R  pR pVP                   ^ ,          P                  R8X  d   TpMTpV P                  WW#4      p\        WVP                  V4      pV# )c                8    V P                  V P                  4      # )zNo copy version)r  r   r  s   &rC   
imp_nocopyarray_ravel.<locals>.imp_nocopy7	  s    {{388$$rE   c                "    V P                  4       # )zCopy version)flattenr  s   &rC   imp_copyarray_ravel.<locals>.imp_copy;	  s    {{}rE   r   )r  rB  r>  r    r  )r   r=   rZ   r  r  r  impr  s   &&&&    rC   array_ravelr  4	  sY    %
 xx{S  

"
"7
;C
7S__c
BCJrE   c                 ,    R  pV P                  WW#4      # )c                 "    V P                  4       # rY  )r  rK  s   &rC   np_ravel_implnp_ravel.<locals>.np_ravel_implM	  s    wwyrE   )r>  )r   r=   rZ   r  r  s   &&&& rC   np_ravelr  K	  s     ##GCFFrE   zarray.flattenc                 ^    R  pV P                  WW#4      p\        WVP                  V4      pV# )c                 T    V P                  4       P                  V P                  4      # rY  )r  r  r   r  s   &rC   r  array_flatten.<locals>.impV	  s    xxz!!#((++rE   )r>  r    r  )r   r=   rZ   r  r  r  s   &&&&  rC   array_flattenr  S	  s2    , 
"
"7
;C
7S__c
BCJrE   c                    Vf   \         P                  ! V 4      MTp\         P                  ! WV4      w  rVp\         P                  ! VP                  4       F2  pWX,          p	Wh,          p
Wx,          p\        \        W4      V4      WH&   K4  	  V# rY  )r  
empty_likebroadcast_arraysndindexre   minr  )rK  a_mina_maxr  r  a_ba_min_ba_max_br  val_a	val_a_min	val_a_maxs   &&&&        rC   _np_clip_implr  ^	  su     "k"--
sC//%@C'CII&
N	N	U.	:
	 ' JrE   c                     \         P                  ! V P                  4       F7  pW,          pW,          pV'       d   \        WV4      W4&   K*  \	        WV4      W4&   K9  	  V# rY  )r  r  re   r  r  )rK  buse_minr  r  r  val_bs   &&&&   rC   _np_clip_impl_noner  l	  sI    AGG$U*CJU*CJ % JrE   c                 <   \        V 4      '       g   \        P                  ! R 4      h\        V\        P
                  4      '       g(   \        V4      '       g   \        P                  ! R4      h\        V\        P
                  4      '       g(   \        V4      '       g   \        P                  ! R4      h\        V\        P                  4      '       g*   \        V4      '       g   Rp\        P                  ! V4      hVRJ ;'       g    \        V\        P
                  4      pVRJ ;'       g    \        V\        P
                  4      pV'       d   V'       d   RR lpV# \        V\        P                  4      p\        V\        P                  4      p	V'       d   V	'       d   RR lp
V
# V'       d   V	'       g   V'       d   RR lpV# RR lpV# V'       g   V	'       d   V'       d   RR	 lpV# RR
 lpV# V'       d   RR lpV# V'       d   RR lpV# RR lpV# )r  z6The argument "a_min" must be a number or an array-likez6The argument "a_max" must be a number or an array-likez5The argument "out" must be an array if it is providedNc                     \        R 4      h)z&array_clip: must set either max or minr   rK  r  r  r  s   &&&&rC   
np_clip_nnnp_clip.<locals>.np_clip_nn	  s    EFFrE   c                     Vf   \         P                  ! V 4      MTp\         P                  ! V P                  4       F"  pW,          p\	        \        Wa4      V4      WE&   K$  	  V# rY  )r  r  r  re   r  r  rK  r  r  r  r  r  r  s   &&&&   rC   
np_clip_ssnp_clip.<locals>.np_clip_ss	  sP     '*k"--"sCAGG, U!2E:
 - JrE   c                     Vf   \         P                  ! V 4      MTp\         P                  ! V P                  4       F  pW,          p\	        Wa4      WE&   K  	  V# rY  )r  r  r  re   r  r  s   &&&&   rC   
np_clip_snnp_clip.<locals>.np_clip_sn	  I     +.+bmmA&3ZZ0EHE!$U!2CJ 1 
rE   c                 F    \         P                  ! W4      p\        WW#4      # rY  r  	full_liker  )rK  r  r  r  
a_min_fulls   &&&& rC   
np_clip_sanp_clip.<locals>.np_clip_sa	  s    
  \\!3
$QE??rE   c                     Vf   \         P                  ! V 4      MTp\         P                  ! V P                  4       F  pW,          p\	        Wb4      WE&   K  	  V# rY  )r  r  r  re   r  r  s   &&&&   rC   
np_clip_nsnp_clip.<locals>.np_clip_ns	  r  rE   c                 F    \         P                  ! W4      p\        WWC4      # rY  r  )rK  r  r  r  
a_max_fulls   &&&& rC   
np_clip_asnp_clip.<locals>.np_clip_as	  s    
  \\!3
$Qz??rE   c                     Vf   \         P                  ! V 4      MTp\         P                  ! W4      w  rV\        WVRV4      # )NTr  r  r  r  )rK  r  r  r  r  r  r  s   &&&&   rC   
np_clip_nanp_clip.<locals>.np_clip_na	  s7    *-+bmmA&3!221<)#cBBrE   c                     Vf   \         P                  ! V 4      MTp\         P                  ! W4      w  rV\        WVRV4      # )NFr  )rK  r  r  r  r  r  r  s   &&&&   rC   
np_clip_annp_clip.<locals>.np_clip_an	  s7    *-+bmmA&3!221<)#sCCrE   c                     \        WW#4      # rY  )r  r  s   &&&&rC   
np_clip_aanp_clip.<locals>.np_clip_aa	  s     %Qu::rE   rY  )	r   r   r   r   r   rT  r   r   r  )rK  r  r  r  r   a_min_is_nonea_max_is_noner  a_min_is_scalara_max_is_scalarr  r  r  r	  r  r  r  r  s   &&&&              rC   np_clipr  x	  s   A  !FGGuenn-- ''   #4 6 	6 uenn-- ''   "4 5 	5 sEKK((K,<,<E  %% TMFFZu~~%FMTMFFZu~~%FM	G  5O 5O?		 		 @ 	 @  C D ; rE   clipc                     RR lpV# )Nc                 0    \         P                  ! WW#4      # rY  )r  r  r  s   &&&&rC   r   array_clip.<locals>.impl	  s    wwq,,rE   NNNrr   )rK  r  r  r  r   s   &&&& rC   
array_clipr#  	  s    -KrE   c           	     v  aaaa VP                   VP                   8X  g   Q hVP                  VP                  8X  g   Q h\        VP                  4      p\        R4      o\        R4      o\        R4      o\        P                  oVVVV3R lpV P                  \        P                  \        W4      4      pV P                  \        P                  \        W4      4      pV P                  \        P                  VP                   4      p	\        P                  ! WP                  R4      ^ ^ 4      p
\        P                  ! VVP                  R4      ^ ^ 4      p\        P                  ! \        P                  ^RR7      pV P                  V4      p\        P                  ! VV P                  \        P                  VP                   4      .4      pV P                  V P                  \        P                  4      4      pV P                  \        P                  V4      p\        P                  ! W.4      pV! W4      p\!        VV
VVVRR	7       V! W4      p\!        VVVVVRR	7       VP#                  4       pVP#                  4       pV	VVWxV P                  \        P                  V4      .p\%        \        P&                  \        P                  VV\        P                  \        P                  \        P                  4      pV P)                  WVV4      p\+        W44       \-        WVP.                  V4      pV# )
z
Attempt to fix up *ary* for switching from *oldty* to *newty*.

See Numpy's array_descr_set()
(np/core/src/multiarray/getset.c).
Attempt to fix the array's shape and strides for a new dtype.
False is returned on failure, True on success.
r  r   Fc                   < VS	8X  d.   VR,          V8X  d
   S! S
4      pMV^ ,          V8X  d	   S! S4      pW48w  d   VS	8X  g   V ^ 8X  d   R# VS
8X  d   V ^,
          pM^ pWC8  d2   W4,          ^ 8w  d   R# W4,          pW;;,          V,          uu&   WBV&   R# WC8  d/   W,          V,          pW,          ^ 8w  d   R# W,          W&   WBV&   R#  R# )r  FTr\  rr   )r  rl   r   old_itemsizenew_itemsizerB  rm   newdim
bytelength
any_layoutc_layoutf_layoutint8s   &&&&&&   rC   r  _change_dtype.<locals>.imp
  s     Zr{l*h|+h'Vz-AR1WXQAA& +1!1FGvG%AJ"  ( </J)a/ 0DG%AJ  rE   re   r   r:  Nr;  )rp   rB  ordr   r.  r   r   r   r	   rh   rg   r   r~   rj   r   r   r   r  r#   booleanr>  r   r   r  )r   r=   oldtynewtyr  
new_layoutr  r'  r(  r  
shape_datastrides_datashape_strides_array_typearyclsshape_constantsizeof_intpstrides_constantr  strides_aryre   r   r  rZ   r  r+  r,  r-  r.  s   &&&&&                   @@@@rC   _change_dtyper=  	  s    ::###<<5<<'''U\\"JSJ3xH3xH::D. .` ''

(4W(DFL''

(4W(DFL 
		ejj%**	5B%%g/C/CG/L&',J''(+(<(<Y(GAOL  %{{!CP 89F'')0)=)=ejj>Cjj*J )KLN (()>)>uzz)JKK&&uzz;?K))'=Aw(I9"'+'! *K;$'+'! !E##%Gw  Z8:D EMMJJ,,JJJJJJC 
"
"7d
;Ce!
Gcoos
CCJrE   c                 Z    \        V 4      '       g   \        P                  ! R 4      hR pV# )z+The argument to np.shape must be array-likec                 B    \         P                  ! V 4      P                  # rY  )r  r  re   r  s   &rC   r   np_shape.<locals>.impl|
  s    zz!}"""rE   r   r   r   rK  r   s   & rC   np_shaperC  w
  s)    A  !NOO#KrE   c                 Z    \        V 4      '       g   \        P                  ! R 4      hR pV# )z*The argument to np.size must be array-likec                 B    \         P                  ! V 4      P                  # rY  )r  r  r   r  s   &rC   r   np_size.<locals>.impl
  s    zz!}!!!rE   rA  rB  s   & rC   np_sizerG  
  s)    A  !MNN"KrE   c                     R  pV# )c                 h   R  p\         P                  ! V P                  4       4      p\        VR,          4      p\	        VR,          4       UUu. uF:  w  rEW$,          V8w  g   K  V! W$,          4      '       d   V! V4      '       d   K8  VNK<  	  ppp\         P
                  ! W6,           4      # u uppi )c                     W 8X  * # rY  rr   )r  s   &rC   isnan0np_unique.<locals>.np_unique_impl.<locals>.isnan
  s
    <rE   Nr  Nr  )r  sortr  r   r   r   )arrK  r  headrm   r  tails   &      rC   np_unique_impl!np_unique.<locals>.np_unique_impl
  s    	  GGBHHJAbE{#AbE*
*$!tqy "'++%( A* 	 
 xx$$	
s   B.%B.	B.rr   )rO  rR  s   & rC   	np_uniquerT  
  s    
% rE   c                    R  p\        V \        P                  \        P                  \        P                  \        P
                  \        P                  34      '       d   \        V\        P                  4      '       d   \        # \        V\        P                  \        P                  34      '       d-   \        VP                  \        P                  4      '       d   V# \        P                  ! R4      hR# )c                    \         P                  ! V\         P                  R 7      pVP                  ^ ,          ^8X  d   \	        W^ ,          4      # \         P
                  ! V^ 8  4      '       d   \        R4      h\         P                  ! V 4      pVP                  4       pVP                  ^ ,          pVP                  VP                  8w  d   \        R4      h\         P                  ! \         P                  ! V4      VP                  R 7      p^ p\        V4       F)  pWH,          WgWrV,          ,           % WrV,          ,          pK+  	  V# )r   r  z(operands could not be broadcast together)r  r  r  re   np_repeat_impl_repeats_scalerr`  r   r  emptyr   r   r8   )	rK  r  repeats_arrayasaaraveln	to_returnposrm   s	   &&       rC   !np_repeat_impl_repeats_array_like4np_repeat.<locals>.np_repeat_impl_repeats_array_like
  s    

7"((;q!Q&0!4DEE66-!#$$BCCjjmLLO<<=...:< <HHRVVM2#))D	qA6<iIC"223##C  rE   zIThe repeats argument must be an integer or an array-like of integer dtypeN)r   r   r   Listrf  r  r  r   rX  r   r   r   )rK  r  r`  s   && rC   	np_repeatrc  
  s    
, !ekkjjoollmm	   gu}}--00%++uzz!:;;'--7788  01 	1rE   c                    V^ 8  d   \        R4      h\        P                  ! V 4      pVP                  4       pVP                  ^ ,          pV^ 8X  d#   \        P
                  ! ^ VP                  R7      # V^8X  d   \        P                  ! V4      # \        P
                  ! WA,          VP                  R7      p\        V4       F"  pW6,          WVV,          V^,           V,          % K$  	  V# )r   r  rW  )	r   r  r  r  re   rY  r   r  r8   )rK  r  r[  r\  r]  r^  rm   s   &&     rC   rX  rX  
  s    {>??
**Q-CYY[FQA!|xx++	AwwvHHQ[		:	qA9?I'kQUg$56 rE   repeatc                     R  pV# )c                 .    \         P                  ! W4      # rY  )r  re  )rK  r  s   &&rC   array_repeat_impl'array_repeat.<locals>.array_repeat_impl
  s    yy$$rE   rr   )rK  r  rh  s   && rC   array_repeatrj  
  s    % rE   c                :    \         P                  ! V4      pR pW#3# )z"Computes the itemsize of the dtypec                     V P                  VP                  ^ ,          P                  4      pV P                  VP                  4      pV! V P	                  V4      4      # r   )r   r  r   r  r   )cgctxr=   rZ   llargsr   llintps   &&&&  rC   r  %_intrin_get_itemsize.<locals>.codegen
  sJ    ""388A;#4#45$$S__5e**4011rE   )r   r   )tyctxr   rZ   r  s   &&  rC   _intrin_get_itemsizerr  
  s!     **U
C2 <rE   c                     R # rY  rr   )rK  r   s   &&rC   _compatible_viewrt  
      rE   c                    R pV# )zDDetermines if the array and dtype are compatible for forming a view.c                 r   \        V4      pW P                  8w  Ed   V P                  ^ 8X  d   Rp\        V4      h V P                  ^,
          pV P                  V,          ^8g  pV P
                  ^ 8g  pV P                  V,          V P                  8g  pV'       d   V'       d   V'       d   Rp\        V4      hW P                  8  d/   V^ 8X  g   V P                  V,          ^ 8w  d   Rp	\        V	4      hR# V P                  V,          V P                  ,          p
W,          ^ 8w  d   Rp\        V4      hR# R# )r   zOChanging the dtype of a 0d array is only supported if the itemsize is unchangedzJTo change to a dtype of a different size, the last axis must be contiguouszZWhen changing to a smaller dtype, its size must be a divisor of the size of original dtypezuWhen changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.N)rr  r   rp   r   re   r   r   )rK  r   
dtype_sizemsg1r   p1p2p3r  msg3r)  msg4s   &&          rC   r    ol_compatible_view.<locals>.impl
  s   )%0
#vv{7 &&  66A:D!#B1B4AJJ.Brb2 &&JJ&?ajj:&=&BID$T** 'C
 3&!+1D %T**	 ,9 $rE   rr   rK  r   r   s   && rC   ol_compatible_viewr  
  s    "+F KrE   z
array.viewc                    VP                   ^ ,          pVP                  p\        V4      ! WV^ ,          4      p\        V4      ! W4      p\        VP                  P
                  4      p\        V4       FO  p	\        Wi4      p
V	R8X  d/   VP                  P                  pVP                  W4      Vn        KC  \        WyV
4       KQ  	  \        R8  d[   V P                  pVP                  \        4      pVP!                  V. VP                   O5/ 4      pV P#                  W4      pV! W4       \%        WWEV4      pVP'                  RV\)        VP                  ^ 4      4      pVP+                  V4      ;_uu_ 4        RpV P,                  P/                  V\0        V34       RRR4       VP3                  4       p\5        WVP                  V4      #   + '       g   i     L7; i)r   r   r'  z"new type not compatible with arrayN)r     )r  r  r~   r   r   r   sortedgetattrr   r9   rx  r   r   r  r  rt  r  rP   r=  r*  r   r)  ru  rv  r   r  r   )r   r=   rZ   r  r   r  r  r  fieldsr   r   ro  rq  r
  _compatible_view_sigr   r  r  r   r  s   &&&&                rC   
array_viewr     s{   HHQKEOOE
U
Gd1g
6C
U
G
-C''(FF^co;HHMMEs2CHCC    &&''(89#11%388rJ##D?W	ws	;B  r8BGGQ+?@D			2))':vF 
 --/CWsDD 
	s   9%GG	r   c                 :    V P                  4       p\        WW$4      # rY  )ry  r!   r   r=   r  r%  r  s   &&&& rC   array_dtyper  K  s    

!
!
#Cg99rE   re   c                 Z    \        V4      pV! WV4      pVP                  p\        WW&4      # rY  )r~   re   r!   r   r=   r  r%  r   r   r  s   &&&&   rC   array_shaper  Q  s/     oGGe,E
++Cg99rE   r   c                 Z    \        V4      pV! WV4      pVP                  p\        WW&4      # rY  )r~   r   r!   r  s   &&&&   rC   array_stridesr  Z  s/     oGGe,E
--Cg99rE   rp   c                 n    V P                  \        P                  VP                  4      p\	        WW$4      # rY  )r   r   r   rp   r!   r  s   &&&& rC   
array_ndimr  c  s+     

uzz388
4Cg99rE   r   c                 Z    \        V4      pV! WV4      pVP                  p\        WW&4      # rY  )r~   r   r!   r  s   &&&&   rC   
array_sizer  j  s-    oGGe,E
,,Cg99rE   r   c                 Z    \        V4      pV! WV4      pVP                  p\        WW&4      # rY  )r~   r   r!   r  s   &&&&   rC   array_itemsizer  r  s/     oGGe,E
..Cg99rE   nbytesc                    \        V4      pV! WV4      pVP                  VP                  VP                  4      p\	        WW&4      # )z
nbytes = size * itemsize
)r~   r   r   r   r!   r  s   &&&&   rC   array_nbytesr  {  s>     oGGe,E
++ellENN
3Cg99rE   
contiguousc                 n    V P                  \        P                  VP                  4      p\	        WW$4      # rY  )r   r   r1  	is_contigr!   r  s   &&&& rC   array_contiguousr    s)    


u}}cmm
<Cg99rE   c_contiguousc                 n    V P                  \        P                  VP                  4      p\	        WW$4      # rY  )r   r   r1  is_c_contigr!   r  s   &&&& rC   array_c_contiguousr    )    


u}}coo
>Cg99rE   f_contiguousc                 n    V P                  \        P                  VP                  4      p\	        WW$4      # rY  )r   r   r1  is_f_contigr!   r  s   &&&& rC   array_f_contiguousr    r  rE   r  c                 x    V P                  \        P                  VP                  '       * 4      p\	        WW$4      # rY  )r   r   r1  mutabler!   r  s   &&&& rC   array_readonlyr    s+    


u}}#++o
>Cg99rE   ctypesc                     \        V4      pV! WV4      p\        P                  ! V4      pV P                  W4      pVP                  Vn        VP
                  Vn        VP                  4       p\        WWh4      # rY  )r~   r   ArrayCTypesr  r   r   r  r   )	r   r=   r  r%  r   r   actctinfor  s	   &&&&     rC   array_ctypesr    sh    oGGe,E


C
 C  .F**FK]]FN



CWs88rE   r   c                     V P                  WVR 7      pVP                  pVP                  WPP                  \        P
                  4      4      p\        WW%4      # r$  )r  r   rU  r   r   r   r!   )r   r=   r  r%  r  r  s   &&&&  rC   array_ctypes_datar    sL      U ;F
++C


3 6 6uzz B
CCg99rE   c                     V P                  WVR 7      pVP                  pVP                  W`P                  V4      4      p\	        WW64      # r  )r  r   rx  r   r!   )r   r=   fromtytotyr   r  r  s   &&&&&  rC   array_ctypes_to_pointerr    sH        <F
++C
//#55d;
<Cg::rE   c                   \        V4      ! WVR7      p\        P                  ! \        P                  VP                  4      pVP                  VP                  VP                  4      4      p\        \        P                  WU\        P                  4      pVP                  VP                  VP                  \        P                  V4      .pVP                  W VV4      p	V	# )a  Helper to invoke the contiguous checker function on an array

Args
----
checker :
    ``numba.numpy_supports.is_contiguous``, or
    ``numba.numpy_supports.is_fortran``.
context : target context
builder : llvm ir builder
aryty : numba type
ary : llvm value
r$  )r~   r   r  r   rp   r   r   r   r#   bool_re   r   r   r>  )
checkerr   r=   r   r  tup_intpr   	check_sig
check_argsr  s
   &&&&&     rC   _call_contiguous_checkr    s     U
GC
8C~~ejj%**5H%%g&<&<U[[&IJH%++x5::FI))S[[&&uzz8<>J((9)35IrE   r   c                     V P                  V\        P                  ! V4      4      pW4n        VP	                  4       pV P
                  P                  WV4       \        WW%4      # rY  )r  r   
ArrayFlagsr   r  r
  r  r    )r   r=   r  r%  flagsobjr  s   &&&&  rC   array_flagsr    sS    ""7E,<,<S,ABHO



CKKwU+Gc77rE   c                 6   VP                   P                  R 8w  d;   V P                  WVR7      p\        \        WVP                   VP
                  4      pM9VP                   P                  R 8H  pV P                  \        P                  V4      p\        WW%4      # )r   r$  )
ra   rB  r  r  r   r   r   r   r1  r!   )r   r=   r  r%  r  r  r   s   &&&&   rC   array_flags_c_contiguousr    s     ~~#&&w5&A$]G%(^^X__F nn##s*""5==#6g99rE   c                 z   VP                   P                  R 8w  d;   V P                  WVR7      p\        \        WVP                   VP
                  4      pM[VP                   P                  pVP                   P                  ^8  d   VR 8H  MVR9   pV P                  \        P                  V4      p\        WW%4      # )r%  r$  rN  )ra   rB  r  r  r   r   rp   r   r   r1  r!   )r   r=   r  r%  r  r  rB  r   s   &&&&    rC   array_flags_f_contiguousr    s    
~~#&&w5&A$Z%(^^X__F &&"~~22Q6fmFdN""5==#6g99rE   rr  c                    VP                   \        P                  9   d   \        WW#R R7      # VP                   \        P                  9   d   \        WW#4      # \        RP                  \        P                   4      4      h)rr  attrzunsupported .real for {})	r   r   complex_domainarray_complex_attrnumber_domainr   rQ   r   r9   )r   r=   r  r%  s   &&&&rC   array_real_partr    s]    
yyE(((!'CVLL	e))	) 3>>!"<"C"CDJJ"OPPrE   rt  c                 .   VP                   \        P                  9   d   \        WW#R R7      # VP                   \        P                  9   d   \        VP                  RR7      V4      p\        WWC.4      w  rV\        WWV4      p\        P                  ! WP                  VP                  VP                  VP                  4      ^ 4       \        WVP                   VP#                  4       4      # \%        RP'                  \(        P                   4      4      h)rt  r  Tr  zunsupported .imag for {})r   r   r  r  r  r#   r  _parse_empty_like_argsr@  r	   memsetr   r   r   r   r    r  r  rQ   r   r9   )r   r=   r  r%  rZ   r  r  r  s   &&&&    rC   array_imag_partr    s    
yyE(((!'CVLL	e))	)$/503PWw?w'++cll69jj+BCD	F#// #1 	1 ""<"C"CDJJ"OPPrE   c                   VR9  g    VP                   \        P                  9  d   \        RP	                  V4      4      h\        V4      pV! WV4      pVP                   P                  pV P                  V P                  V4      4      pVP                  P                  V4      p	V P                  V4      P                  4       p
VP                  VP                  V
4      pVR8X  d.   VP                  V\         P"                  ! ^ 4      ! ^4      .4      pVP%                  VRR7      p\        V4      ! W4      p\'        WR7      p\(        P*                  ! WV4       \-        WWP/                  4       4      # )at  
Given a complex array, it's memory layout is:

    R C R C R C
    ^   ^   ^

(`R` indicates a float for the real part;
 `C` indicates a float for the imaginary part;
 the `^` indicates the start of each element)

To get the real part, we can simply change the dtype and itemsize to that
of the underlying float type.  The new layout is:

    R x R x R x
    ^   ^   ^

(`x` indicates unused)

A load operation will use the dtype to determine the number of bytes to
load.

To get the imaginary part, we shift the pointer by 1 float offset and
change the dtype and itemsize.  The new layout is:

    x C x C x C
      ^   ^   ^
rt  zcannot get attribute `{}`r  r   rB  )r   r   )rr  rt  )r   r   r  rQ   r   r~   underlying_floatr   r   r   r9   r   r=  rx  r   rC  r   IntTyper  r   r	   copy_structr   r  )r   r=   r  r%  r  r   r   fltysizeof_fltyr   
llfltptrtyr  resulttyr.  repls   &&&&&          rC   r  r    s5   8 ##syy8L8L'L!"="D"DT"JKKoGGe,E 99%%D(()>)>t)DEK~~"";/H ''-88:Jooejj*5G v~++g

2q(9':; xxd3x/H!'3FW0Dt,Wx9I9I9KLLrE   conj	conjugatec                     R  pV# )c                 .    \         P                  ! V 4      # rY  )r  r  rP  s   &rC   r   array_conj.<locals>.implX  s    wws|rE   rr   rP  r   s   & rC   
array_conjr  U  s    KrE   c                 "    V P                  4       # rY  )ry  )r   r=   dtypetydtypevals   &&&&rC   
dtype_typer  `  s    ""$$rE   r9   kindstatic_getitemc                    VP                   p\        V\        P                  4      '       d$   V P	                  V4      ! R4      p\        WWE4      # Rp\        P                  ! V4      h)zThis handles the "static_getitem" when a Numba type is subscripted e.g:
var = typed.List.empty_list(float64[::1, :])
It only allows this on simple numerical types. Compound types, like
records, are not supported.
NzlUnreachable; the definition of __getitem__ on the numba.types.abstract.Type metaclass should prevent access.)r  r   r   r   r   r!   r   LoweringError)r   r=   rZ   r  r  r  r   s   &&&&   rC   static_getitem_number_clazzr  m  s[     OOE%%% $$U+D1!'E??L""3''rE   c           
     &   \        V4      pV! WV4      pVP                  p\        V\        P                  4      '       g   \        RV: RV: R24      hVP                  V4      pVP                  V4      p	\        V\        P                  4      '       d;   VP                  VP                  VP                  VP                  ,           RR7      p
MVP                  VRR7      p
\        V
4      pV! W4      pV P                  \        P                  V	4      p\        P                  ! WP                  WP                  P                   R7      p\        V\        P                  4      '       Ed   \        P"                  ! WP$                  VP                  4      pYP$                   Uu. uF#  pV P                  \        P                  V4      NK%  	  up,          p\        P"                  ! WP&                  VP                  4      pTVP&                   Uu. uF#  pV P                  \        P                  V4      NK%  	  up,          pV P)                  V P+                  VP                  4      4      pM8VP$                  pVP&                  pV P)                  V P+                  V4      4      p\-        VVVVV P                  \        P                  V4      VP.                  VP0                  R7       VP3                  4       p\5        WV
V4      # u upi u upi )	ze
Generic getattr() implementation for record arrays: fetch the given
record member, i.e. a subarray.
z
attribute z of z not definedr  r:  r  )r  rN  )r~   r   r   r   RecordrQ   typeofr  NestedArrayr  rp   r   r   r	   r  r   r9   r   re   r   r   r   r   r   r   r  r   )r   r=   r  r%  r  r   r   rectyper   r  restyrarytyraryconstoffset
newdataptrre   rm   r   datasizer  s   &&&&&               rC   array_record_getattrr    sS    oGGe,EiiGgu||,,!%)3#0 1 	1NN4 E^^D!F%**++++CHHuzz$9#  G uS1F'#D&&uzz6:K$$[yy~~J %**++$$Wkk388D{{K{!'&&uzz15{KK&&wsxxHOAG((Q7OO))'*?*?*LM --))'*?*?*FG4""#00XF ==,,( ..
CWuc::' L Ps   ')L	)Lc                     V^,          p\        V\        4      '       g   \        h\        WVP                  ^ ,          V^ ,          V4      # r  )r   r  rQ   r  r  )r   r=   rZ   r  r  s   &&&& rC   array_record_getitemr    s;    GEeS!!!!#((1+tAwNNrE   c           
        V P                  W$4       VP                  V4      pVP                  V4      p\        V\        P
                  4      '       Ed5   \        V4      pV! W4      pVP                  p	VP                   U
u. uF"  qP                  \        P                  V
4      NK$  	  pp
VP                   U
u. uF"  qP                  \        P                  V
4      NK$  	  pp
\        P                  ! WVV P                  V	4      4      p\        VV\        P                   ! W4      \        P                   ! W4      V P                  \        P                  VP"                  4      RRR7       VP%                  4       p\'        WW.4      # \        P                  ! WVV P                  V4      4      pVP(                  '       d   RM^pV P+                  WVV4      p\'        WW.4      # u up
i u up
i )zL
Generic getattr() implementation for records: get the given record member.
NrN  )sentry_record_alignmentr  r  r   r   r  r~   r   re   r   r   r   r	   get_record_memberr   r   rj   r   r  r   r   r   )r   r=   r  r%  r  r  elemtyr   r  r   r   r  r  newdatar  dptrr   s   &&&&&            rC   record_getattrr     s   
 ##C.ZZFZZF&%++,, 6"G%LL"  =>((Q7  	 " nn&$ ?@**5::q9$ 	 &++GF,3,A,A%,HJ$$W7&&w;))%**fkkB	
 mmo 3<<(()0)>)>v)FH""7D%@ 3<<-"&s   (G%:(G*c           	        VP                   w  rVVw  rxV P                  WT4       VP                  V4      p	VP                  V4      p
\	        V
\
        P                  4      '       d   \        P                  ! V4      ! WV^,          R7      pVP                  p\        P                  ! WV	VP                  P                  4      p\        P                  ! WVV P                  \
        P                  V
P                   4      4       R# \        P                  ! WV	V P#                  V
4      4      pV P%                  WWj4      pVP&                  '       d   RM^pV P)                  WWVR7       R# )zL
Generic setattr() implementation for records: set the given record member.
r$  Nr   )r  r  r  r  r   r   r  r	   r}   r   r  r9   pointeememcpyr   r   r   r   r   r   r   )r   r=   rZ   r  r  r  ri  r  r   r  r  
val_structr  r  r  r   s   &&&&&           rC   record_setattrr    s   
 JCKF##C.ZZFZZF&%++,,007>B1gG
oo((&),)9)9;wc++EJJF	H ((&)0)>)>v)FHll777CUCrE   c                    V P                  VP                  ^ ,          V^,          4      pV! WVP                  ^ ,          V^ ,          V^,          4      # z+
Record.__getitem__ redirects to getattr()
)get_getattrr  )r   r=   rZ   r  r   s   &&&& rC   record_static_getitem_strr	    sC    
 sxx{DG4D#((1+tAwQ@@rE   c                d   VP                   ^,          P                  p\        VP                   ^ ,          P                  4      pV P	                  VP
                  WT,          4      pV P                  VP                   ^ ,          V4      pV! WVP                   ^ ,          V^ ,          WT,          4      # r  )r  r   r   r  insert_const_stringr:   r  )r   r=   rZ   r  r   r  ll_fieldr   s   &&&&    rC   record_static_getitem_intr    s    
 ((1+
#
#C#((1+$$%F**7>>6;GHsxx{H5D#((1+tAwDDrE   static_setitemc                    VP                   w  rEpVw  rxp	\        VP                  WF4      p
V P                  W4      pVf   Q hV! WV	34      # z+
Record.__setitem__ redirects to setattr()
)r  r#   r  get_setattr)r   r=   rZ   r  rectyrH  ri  recr   r   getattr_sigr   s   &&&&        rC   record_static_setitem_strr  !  sU    
 hhOEeMCcCOOU:Ks0Ds$$rE   c                    VP                   w  rEpVw  rxp	\        VP                  WF4      p
\        VP                   ^ ,          P                  4      pV P                  W,          V
4      pVf   Q hV! WV	34      # r  )r  r#   r  r   r  r  )r   r=   rZ   r  r  rH  ri  r  r   r   r  r  r   s   &&&&         rC   record_static_setitem_intr  .  sq    
 hhOEeMCcCOOU:K#((1+$$%Fv{K8Ds$$rE   c                &    V P                  WV4      # )z:
Create a constant array (mechanism is target-dependent).
)make_constant_array)r   r=   r\  pyvals   &&&&rC   constant_arrayr  @  s    
 &&wE::rE   c                    \         P                  ! \         P                  ! ^4      VP                  4      pV! \	        VP                  4       4      4      p\        P                  ! W4      # )z?
Create a record constant as a stack-allocated array of bytes.
)r   r<  r  r  	bytearraytobytesr	   r  )r   r=   r\  r  ltyr   s   &&&&  rC   constant_recordr   H  sF    
 ,,rzz!}ell
3C
i(
)C$$W22rE   c                    \         P                  ! \        V4      \         P                  R7      pV P	                  WV4      # )zE
Create a constant array from bytes (mechanism is target-dependent).
rW  )r  r   r  uint8r  )r   r=   r\  r  bufs   &&&& rC   constant_bytesr$  R  s0    
 ((9U#288
4C&&wC88rE   c                 t    VP                   w  rEWE8w  d   \        P                  # R  pV P                  WW#4      # )c                     V P                   VP                   8H  ;'       dO    V P                  VP                  8H  ;'       d.    V P                  P                  VP                  P                  8H  # rY  )re   r   r  r   rK  r  s   &&rC   array_is_implarray_is.<locals>.array_is_impld  sS    177" / /		QYY&/ /.	0rE   )r  r	   r(  r>  )r   r=   rZ   r  atybtyr(  s   &&&&   rC   array_isr,  ^  s8    xxHC
z   0
 ##GCFFrE   __hash__c                     R  # )c                     R # rY  rr   r  s   &rC   r  ol_array_hash.<locals>.<lambda>q  s    trE   rr   r  s   &rC   ol_array_hashr1  o  s    rE   c                    \        V R4      # )ze
Return the Structure representation of the given *flatiterty* (an
instance of types.NumpyFlatType).
flat_make_flattening_iter_cls)
flatitertys   &rC   make_array_flat_clsr7  w  s    
 %Z88rE   c                    \        V R4      # )zj
Return the Structure representation of the given *nditerty* (an
instance of types.NumpyNdEnumerateType).
ndenumerater4  )nditertys   &rC   make_array_ndenumerate_clsr;    s    
 %X}==rE   c                 ,   V P                  \        P                  ^ 4      pVP                  R4      p	Ve!   VP	                  \
        P                  V4       \        \        V4      4       F  p
\
        P                  ! WV
4      p\
        P                  ! WP                  V4      4      pW:,          pVP                  RW4      p\
        P                  ! W4      ;_uu_ 4        VP	                  W4       Ve	   V! V
4       VP                  V	4       RRR4       VP	                  W4       Vf   K  V! V
4       K  	  Ve!   VP	                  \
        P                  V4       VP                  V	4       VP!                  V	4       R#   + '       g   i     L{; i)r   end_incrementNr&  )r   r   r   r  r-  r	   
false_byter<  r8   rh   r,  r>   r'  	if_likelyr  	true_byter  )r   r=   rp   re   r   end_flagloop_continue
loop_breakr  bbendr  idxptrr   r   	in_boundss   &&&&&&&&       rC   _increment_indicesrG    s/   

A.D&&7Eg(((3d$%%g<%%g||F/CD
''S8	w22MM#&(c"NN5! 3 	d#!sO %" g''2NN5E" 32s   !/FFc                     \         P                  ! WP                  VP                  4      p\	        WVP                  WdV4       R # rY  )r	   r   re   rp   rG  )r   r=   rO  rP  r   rA  re   s   &&&&&& rC   _increment_indices_arrayrI    s.      ))UZZ@EwUXNrE   c                  a aaaaaaa	a
a S P                   o
S P                  o\        S P                  4      o	S P                  '       d   S
M^o ! R R\
        4      p ! R RV4      o ! V 3R lRV4      o ! R RV4      o ! R	 R
V4      o ! R RV4      o ! VVVVVVV	V
V V3
R lR\        P                  ! S 4      4      pV# )ze
Return the Structure representation of the given *nditerty* (an
instance of types.NumpyNdIterType).
c                   f   a  ] tR tRt o RtR tR t]P                  R 4       t	R t
R tR tR	tV tR
# )$make_nditer_cls.<locals>.BaseSubIteri  z6
Base class for sub-iterators of a nditer() instance.
c                P    Wn         W n        W0n        W@n        WC,
          V n        R # rY  )nditermember_name	start_dimend_dimrp   )rX   rN  rO  rP  rQ  s   &&&&&rC   r  -make_nditer_cls.<locals>.BaseSubIter.__init__  s!     K*&N"L+DIrE   c                H    \        V P                  V P                  V4       R # rY  )r   rN  rO  )rX   rk   s   &&rC   set_member_ptr3make_nditer_cls.<locals>.BaseSubIter.set_member_ptr  s    DKK!1!137rE   c                B    \        V P                  V P                  4      # rY  )r  rN  rO  r~  s   &rC   
member_ptr/make_nditer_cls.<locals>.BaseSubIter.member_ptr  s    4;;(8(899rE   c                    R # rY  rr   )rX   r   r=   s   &&&rC   init_specific2make_nditer_cls.<locals>.BaseSubIter.init_specific  r  rE   c                    R # rY  rr   rX   r   r=   logical_dims   &&&&rC   rB  2make_nditer_cls.<locals>.BaseSubIter.loop_continue  r  rE   c                    R # rY  rr   r]  s   &&&&rC   rC  /make_nditer_cls.<locals>.BaseSubIter.loop_break  r  rE   )rQ  rO  rp   rN  rP  N)rs   rt   ru   rv   r  r  rT  r  cached_propertyrW  rZ  rB  rC  rx   ry   r  s   @rC   BaseSubIterrL    sB     		,	8 
	"	"	: 
#	:			 	rE   rc  c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	$make_nditer_cls.<locals>.FlatSubIteri  z
Sub-iterator walking a contiguous array in physical order, with
support for broadcasting (the index is reset on the outer dimension).
c                    VP                  \        P                  ^ 4      pV P                  \        P
                  ! W#4      4       R# r  )r   r   r   rT  r	   r  )rX   r   r=   r  s   &&& rC   rZ  2make_nditer_cls.<locals>.FlatSubIter.init_specific  s1    ''

A6D 9 9' HIrE   c                r    VP                  V P                  4      pVP                  VP                  V.4      # rY  )r>   rW  rC  r   )rX   r   r=   r   rO  rP  r  s   &&&&&& rC   compute_pointer4make_nditer_cls.<locals>.FlatSubIter.compute_pointer  s+    LL1E;;sxx%11rE   c                    W0P                   ^,
          8X  dO   VP                  V P                  4      p\        P                  ! W$4      pVP                  W@P                  4       R# R# r  )rp   r>   rW  r	   r,  r-  )rX   r   r=   r^  r  s   &&&& rC   rB  2make_nditer_cls.<locals>.FlatSubIter.loop_continue  sG    ii!m+T__5//?e__5	 ,rE   c                X   V^ 8X  d>   VP                  \        P                  ^ 4      pVP                  W@P                  4       R# W0P
                  ^,
          8X  dO   VP                  V P                  4      p\        P                  ! W%4      pVP                  WPP                  4       R# R# r  )	r   r   r   r-  rW  rp   r>   r	   r,  )rX   r   r=   r^  r  r  s   &&&&  rC   rC  /make_nditer_cls.<locals>.FlatSubIter.loop_break  su    a++EJJ:dOO4		A-T__5//?e__5	 .rE   rr   N)rs   rt   ru   rv   r  rZ  ri  rB  rC  rx   ry   r  s   @rC   FlatSubIterre    s$     	
	J	2	6		6 		6rE   ro  c                   8   <a  ] tR tRt o RtV3R ltR tRtV tR# )+make_nditer_cls.<locals>.TrivialFlatSubIteri  z`
Sub-iterator walking a contiguous array in physical order,
*without* support for broadcasting.
c                0   < SP                   '       d   Q hR # rY  )need_shaped_indexing)rX   r   r=   r:  s   &&&rC   rZ  9make_nditer_cls.<locals>.TrivialFlatSubIter.init_specific  s    444444rE   c                z    \        V4      ^8:  g   Q \        V4      4       hVP                  VP                  V4      # r  )r   rC  r   rX   r   r=   r   rO  rP  s   &&&&&&rC   ri  ;make_nditer_cls.<locals>.TrivialFlatSubIter.compute_pointer  s2    w<1$2c'l2$;;sxx11rE   rr   N)	rs   rt   ru   rv   r  rZ  ri  rx   ry   )r{   r:  s   @rC   TrivialFlatSubIterrq    s     	
	5	2 	2rE   rx  c                   *   a  ] tR tRt o RtR tRtV tR# )'make_nditer_cls.<locals>.IndexedSubIteri  z1
Sub-iterator walking an array in logical order.
c           	     n    \        V4      V P                  8X  g   Q h\        P                  ! WWEVR R7      # )Fre  )r   rp   r	   rA  rv  s   &&&&&&rC   ri  7make_nditer_cls.<locals>.IndexedSubIter.compute_pointer  s6    w<499,,,++Ge,3G GrE   rr   Nrs   rt   ru   rv   r  ri  rx   ry   r  s   @rC   IndexedSubIterrz    s     		G 	GrE   r~  c                   *   a  ] tR tRt o RtR tRtV tR# )'make_nditer_cls.<locals>.ZeroDimSubIteri  z%
Sub-iterator "walking" a 0-d array.
c                    VP                   # rY  )r   rv  s   &&&&&&rC   ri  7make_nditer_cls.<locals>.ZeroDimSubIter.compute_pointer  s    88OrE   rr   Nr}  r  s   @rC   ZeroDimSubIterr    s     		 	rE   r  c                   *   a  ] tR tRt o RtR tRtV tR# )&make_nditer_cls.<locals>.ScalarSubIteri  z(
Sub-iterator "walking" a scalar value.
c                    V# rY  rr   rv  s   &&&&&&rC   ri  6make_nditer_cls.<locals>.ScalarSubIter.compute_pointer  s    JrE   rr   Nr}  r  s   @rC   ScalarSubIterr    s     		 	rE   r  c                      <
a  ] tR tRt o Rt]P                  VVVVVV	3R l4       tVVV	V
3R ltV	3R lt	R t
R tVVV	V
3R ltR	 tR
 tRtV tR# )make_nditer_cls.<locals>.NdIteri  z
.nditer() implementation.

Note: 'F' layout means the shape is iterated in reverse logical order,
so indices and shapes arrays have to be reversed as well.
c           	        < . pR SP                   '       d   SMSRSRSRS/p\        SP                  4       F3  w  r4Vw  rVrxRV,          p	W%,          p
VP                  V
! W	Wg4      4       K5  	  V# )r3  indexed0dscalarzindex%d)rs  r   r  ri   )rX   l	factoriesrm   r+  r  rP  rQ  rH  rO  factoryro  r~  r  rx  r  r:  s   &          rC   subiters(make_nditer_cls.<locals>.NdIter.subiters#  s~    A0M0M0M0"N~!=	I $H$5$56.1+'!m#/IGH	 7
 HrE   c                V  < VP                  \        P                  ^ 4      pVP                  V\        P                  ! V4      V4      V n        \        V4       FY  w  rg\        V\        P                  4      '       d   K'  RV,          p\        P                  ! W$V,          4      p	\        WV	4       K[  	  V P                  WW44      p\        P                  ! \        P                  S4      p
RpRp\        V4       F^  w  rm\        V\        P                  4      '       g   K'  VP                  S8X  g   K:  WF,          P                  pWF,          P                   p M=	  S^ 8X  g   Q hVP                  W*R4      pVP                  \        P                  ^4      pR p\#        W44       F  w  r\        V\        P                  4      '       g   K'  VP                  ^ 8  g   K:  \%        \        P&                  \        P                  ! \        P                  VP                  4      V
4      pVP)                  W.VVP                  V34       K  	  \        P*                  ! W+4      pSR8X  d   VRRR1,          pVP-                  RW4      pVP/                  V\        P0                  \        P2                  4      pSP4                  '       g   V3p\7        V4      S8X  g   Q h\        P8                  ! W%P:                  SR7      p\=        S4       F-  p\        P>                  ! VVV4      pVPA                  VV4       K/  	  VV n!        \        PD                  ! VVVP:                  4      V n        \        P                  ! VV4      V n#        V PH                   F  pVPK                  W4       K  	  R# )	zA
Initialize the nditer() instance for the specific array inputs.
scalar%dNc                     \        V 4      p\        V4       F9  pW,          V\        V4      V,
          V,           ,          8w  g   K0  \        R 4      h	  R# )z2nditer(): operands could not be broadcast togetherN)r   r8   r   )re   
main_shaper]  rm   s   &&  rC   check_shapeBmake_nditer_cls.<locals>.NdIter.init_specific.<locals>.check_shapeV  sH    JqAx:c*o.AA.E#FF( *> ? ? "rE   r%  r'  r  rr   r\  )&r   r   r   r	  r  arraysr   r   r   r	   r  r   _arrays_or_scalarsr  rp   re   r   r   r#   noner>  r   r'  r  r@  r>  rs  r   rV   r9   r8   rh   r-  r   rj   	exhaustedr  rZ  )rX   r   r=   arrtysr  r  rm   r\  rO  slotmain_shape_tyr  main_nitemsrO  r  rP  rZ   r  shape_is_emptyr  r   r  rE  subiterrB  rp   r:  nshapess   &&&&&                   rC   rZ  -make_nditer_cls.<locals>.NdIter.init_specific3  s    ''

A6D ",,Wekk&6I-35DK #6*!"ekk22",q.K"44WQiHDDt4 + ,,WvNF "NN5::t<MJK%f-eU[[11ejjD6H!'J"()"2"2K	 . qy y$//K
%225::qA? "&1
eU[[11ejj1n#EJJ$)NN5::uzz$J$13C ,,W-0399j2IK 2 ))'>F}" %00{IN~w7H7H'.'9'9;I 000 &v;')))))'997KGW~ --gwDdF+ & #DL ++GVTYYGDJ$66w	JDN  ==%%g7 )rE   c                Z  < VP                  R4      p\        P                  ! VVP                  V P                  4      4      p\        P
                  ! W%4      ;_uu_ 4        VP                  R4       VP                  V4       RRR4       SP                  p\        P                  ! W P                  4      pV P                  WWg4      pV P                  pVP                  R4       V P                  WWV4      p	V	 U
u. uF  qP                  4       NK  	  p	p
\        V	4      ^8X  d   VP                  V	^ ,          4       M,VP                  VP!                  VSP"                  V	4      4       \        P                  ! W P$                  4      p\'        W\        V4      VWP                  \(        P*                  ! V P,                  VV4      \(        P*                  ! V P.                  VV4      4       VP                  V4       VP1                  V4       R#   + '       g   i     EL; iu up
i )z2
Compute next iteration of the nditer() instance.
rW  FNT)r  r	   as_bool_bitr>   r  if_unlikelyr(  r  r  r   r  r   _make_viewsr  r   r+  r	  r*  re   rG  r  partial_loop_continue_loop_breakr  )rX   r   r=   r.  rD  r  r  r  r   viewsr   re   r:  s   &&&&        rC   iternext_specific1make_nditer_cls.<locals>.NdIter.iternext_specific  s    ..u5E  ++G,3LL,HJI$$W88  'u% 9 __F))';;?F,,WvNFllG T"$$WwOE,12Eq[[]EE25zQeAh'g00(:M:M168 9 ((**=EwUU&(001D1D1818 :  )001A1A1818 :! NN5!##E*? 988 3s   !#H>H(H%	c                    V P                    FN  pVP                  Tu;8:  d   VP                  8  g   K(  M K,  VP                  WW4P                  ,
          4       KP  	  R # rY  )r  rP  rQ  rB  rX   r   r=   r  r+  s   &&&& rC   r  .make_nditer_cls.<locals>.NdIter._loop_continue  s?    }}==C5#++55%%gmm8KL %rE   c                    V P                    FN  pVP                  Tu;8:  d   VP                  8  g   K(  M K,  VP                  WW4P                  ,
          4       KP  	  R # rY  )r  rP  rQ  rC  r  s   &&&& rC   r  +make_nditer_cls.<locals>.NdIter._loop_break  s=    }}==C5#++55NN7S==5HI %rE   c                  < R.S,          pSP                   pV P                  pSP                  p	\        V	\        P
                  4      '       d   \        V	4      p	MV	.p	\        S4       U
u. uF)  p
VP                  \        P                  ! W#V
4      4      NK+  	  pp
\        Wx4       Fu  w  rVw    rW<P                  VP                   pSR8X  d   VRRR1,          pV F9  p
Wj,          e   Q hV P                  WVW,          WJ,          WZ,          V4      Wj&   K;  	  Kw  	  \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   Q hV# u up
i )z"
Compute the views to be yielded.
Nr%  c              3   $   "   T F  qx  K  	  R # 5irY  rr   r[  r   s   & rC   r]  >make_nditer_cls.<locals>.NdIter._make_views.<locals>.<genexpr>  s     (%Qq%s   FTr\  )r  r  r*  r   r   rf  r   r8   r>   r	   rh   r   rP  rQ  
_make_viewr  )rX   r   r=   r   r  r  r  r  r  rettysrm   r+  r  rH  array_indicessub_indicesrB  narraysr:  r  s   &&&&&&          rC   r  +make_nditer_cls.<locals>.NdIter._make_views  sC    FW$E((H}}H((F&%//22f  %g0 .1 ||G$8$81$MN .  0 !$H 7),&1a%&7&7HS="-dd"3K&A 8+++#w/5y/5y&)W NEH ' !8 3(%(333(%(((((L0s   ,/Ec           	        \        V\        P                  4      '       d   VP                  ^ 8X  g   Q hVP	                  WW5V4      pVP                  V4      ! W4      p	\        W4      p
VP                  V\        P                  ! \        P                  ^ 4      R4      pVP                  V\        P                  ! \        P                  ^ 4      R4      p\        WWV
RR7       V	# )z,
Compute a 0d view for a given input array.
N)r   rr   )r   r   r   rp   ri  r~   r   r	  r  r   r   )rX   r   r=   r   r  rO  rP  r  rk   viewr   re   r   s   &&&&&&&&     rC   r  *make_nditer_cls.<locals>.NdIter._make_view  s    
 eU[[11ejjAoEE))'GCPC%%e,W>D#G3H&&wuzz10M')+E((%..Q2O)+-G 4ehMKrE   c           	     $   . p\        \        W44      4       Fu  w  pw  rx\        V\        P                  4      '       d,   VP                  VP                  V4      ! VVVR 7      4       KS  VP                  \        V RV,          4      4       Kw  	  V# )r$  r  )r   r   r   r   r   ri   r~   r  )	rX   r   r=   r  r  r  rm   rO  rP  s	   &&&&&    rC   r  2make_nditer_cls.<locals>.NdIter._arrays_or_scalars  s}     A#,S-@#A<EeU[[11HHW//6w7>=@B C HHWT:>:; $B HrE   )r  r  r   re   N)rs   rt   ru   rv   r  r  rb  r  rZ  r  r  r  r  r  r  rx   ry   )r{   ro  r~  r  rx  r  rB  r  rp   r:  r  s   @rC   NdIterr    sa     	 
	"	"	 	 
#	M	8 M	8^(	+T	M
	J
	 	8	(	 	rE   r  )rp   rB  r   r  rs  objectr	   r}   )r:  rc  r  ro  r~  r  rx  r  rB  r  rp   r  s   f  @@@@@@@@@rC   make_nditer_clsr    s    
 ==D__F(//"G333dGf 86k 6@2[ 2G G  V V V,,X6 Vp MrE   c                d   a V P                   o ! V3R lR\        P                  ! V 4      4      pV# )zf
Return the Structure representation of the given *nditerty* (an
instance of types.NumpyNdIndexType).
c                   >   <a  ] tR tRt o RtV3R ltV3R ltRtV tR# )%make_ndindex_cls.<locals>.NdIndexIteri  z
.ndindex() implementation.
c                  < VP                  \        P                  ^ 4      p\        P                  ! W$P
                  VP                  \        P                  S4      R7      p\        P                  ! V\        P                  4      p\        S4       F  p\        P                  ! W%V4      pVP                  WH4       W7,          p	VP                  RW4      p
\        P                  ! W*4      ;_uu_ 4        VP                  \        P                  V4       RRR4       K  	  WPn        W`n        \        P                   ! W#VP
                  4      V n        R#   + '       g   i     K  ; ir   r  r'  N)r   r   r   r	   rV   r9   r  r>  r8   rh   r-  r*  r  r@  r   r  rj   re   )rX   r   r=   r  r  r   r  r  rE  r  dim_is_emptyrp   s   &&&&       rC   rZ  3make_ndindex_cls.<locals>.NdIndexIter.init_specific  s   ''

A6D))'99/6/C/CEJJDH0JKG  11'7;M;MNIT{ --gDd+ ";&44T8J((??MM'"3"3Y? @? # #L&N ++GTYYGDJ @??s   5!EE'c           
       < VP                  \        P                  ^ 4      pVP                  R4      p\        P
                  ! VVP                  V P                  4      4      p\        P                  ! W&4      ;_uu_ 4        VP                  R4       VP                  V4       RRR4       \        S4       Uu. uF4  pVP                  \        P                  ! VV P                  V4      4      NK6  	  ppV F  p	\        W)4       K  	  VP                  \        P                   ! W(VP"                  4      4       VP                  R4       \        P$                  ! W P&                  S4      p
\)        WSV
V P                  V P                  4       VP                  V4       VP+                  V4       R#   + '       g   i     EL; iu upi )r   rW  FNT)r   r   r   r  r	   r  r>   r  r  r(  r  r8   rh   r   rH   r+  rj   r9   r   re   rG  r  )rX   r   r=   r.  r  rD  r  r  r   r>   re   rp   s   &&&&       rC   r  7make_ndindex_cls.<locals>.NdIndexIter.iternext_specific  sf   ''

A6D..u5E++G,3LL,HJI$$W88  'u% 9 #(+/ #.3 ||G$8$89=9<%> ? #.  /  g,   MM',,WtyyIJT"((**dCEwu#||T^^= NN5!##E*' 988/s   #F29:G2G	)r  r   re   N)	rs   rt   ru   rv   r  rZ  r  rx   ry   )r{   rp   s   @rC   NdIndexIterr    s     		H,	+ 	+rE   r  )rp   r	   r}   )r:  r  rp   s   & @rC   make_ndindex_clsr    s.    
 ==D5+g11(; 5+n rE   c                    a SR9   g   Q hV P                   pVP                  R8X  d%    ! V3R lR\        P                  ! V 4      4      pV#  ! V3R lR\        P                  ! V 4      4      pV# )r3  r   c                   J   <a  ] tR tRt o RtV3R ltV3R ltR tR tRt	V t
R# )	6_make_flattening_iter_cls.<locals>.CContiguousFlatIteri=  zB
.flat() / .ndenumerate() implementation for C-contiguous arrays.
c                  < VP                  \        P                  ^ 4      p\        P                  ! W%4      V n        VP                  V n        S	R8X  d   \        P                  ! W%P                  VP                  \        P                  VP                  4      R7      p\        VP                  4       F+  p\        P                  ! W&V4      pVP                  WX4       K-  	  W`n        R# R# )r   r9  r  N)r   r   r   r	   r  r  r   r-  rV   r9   rp   r8   rh   r-  r   )
rX   r   r=   rO  rP  r  r   r  rE  r  s
   &&&&&    rC   rZ  D_make_flattening_iter_cls.<locals>.CContiguousFlatIter.init_specificB  s    ++EJJ:$66wE
 "ll=(%11$11%**ejjIKG  %UZZ0!(!5!5g!Ld3  1 $+L )rE   c                  < VP                   pVP                  pVP                  V P                  4      pVP	                  R W4      p	VP                  V	4       \        P                  ! W)4      ;_uu_ 4        VP                  VP                  V.4      p
\        WW:4      pSR8X  d   VP                  V4       MV P                  p\        V4       Uu. uF*  pVP                  \        P                  ! VVV4      4      NK,  	  pp\        P                  ! W.VP!                  \"        P$                  4      R7      pVP                  \        P&                  ! VW.4      4       \)        WVWL4       \        P*                  ! W(4      pVP-                  WP                  4       RRR4       R# u upi   + '       g   i     R# ; i)r&  r3  r\  N)rp   r   r>   r  r'  r(  r	   r?  rC  r   r   r+  r   r8   rh   rj   r   r   r   make_anonymous_structrI  r,  r-  )rX   r   r=   rO  rP  r.  rp   r   r  r1  rk   r%  r   r  idxvalsidxtupler  s   &&&&&&          rC   r  H_make_flattening_iter_cls.<locals>.CContiguousFlatIter.iternext_specific[  s   zzTZZ0"..sEB  *&&w99!++chh8C%gCEv~e, #',, /4Dk#; /:s $+<<0D0DWELEH1J $K /:   #; $+#5#5g9@9N9N:?**:F$G #99';C:KMN 1514? $33GCEMM%4- :9#; :99s    6AF-0F(BF-(F--F>	c                T    VP                  VP                  V.4      p\        WW64      # rY  )rC  r   r   rX   r   r=   rO  rP  r  rk   s   &&&&&& rC   r  >_make_flattening_iter_cls.<locals>.CContiguousFlatIter.getitem{  s%    kk#((UG4 5>>rE   c                Z    VP                  VP                  V.4      p\        WW6V4       R # rY  )rC  r   r   rX   r   r=   rO  rP  r  r%  rk   s   &&&&&&& rC   setitem>_make_flattening_iter_cls.<locals>.CContiguousFlatIter.setitem  s$    kk#((UG47U3?rE   )r  r   r-  N)rs   rt   ru   rv   r  rZ  r  r  r  rx   ry   r{   r  s   @rC   CContiguousFlatIterr  =  s&     +25@?@ @rE   r  c                   J   <a  ] tR tRt o RtR tV3R ltR tR tR t	Rt
V tR	# )
+_make_flattening_iter_cls.<locals>.FlatIteri  z
Generic .flat() / .ndenumerate() implementation for
non-contiguous arrays.
It keeps track of pointers along each dimension in order to
minimize computations.
c                   VP                  \        P                  ^ 4      pVP                  pVP                  p\
        P                  ! W$P                  V4      p\
        P                  ! W%P                  VP                  \        P                  VP                  4      R7      p	\
        P                  ! W&P                  VP                  \        P                  VP                  4      R7      p
\
        P                  ! V\
        P                  4      p\        V4       F  p\
        P                  ! W)V4      p\
        P                  ! W*V4      pVP                  Wn4       VP                  W]4       W,          pVP                  RW4      p\
        P                   ! VV4      ;_uu_ 4        VP                  \
        P"                  V4       RRR4       K  	  Wn        Wn        Wn        R#   + '       g   i     K  ; ir  )r   r   r   r   rp   r	   r   re   rV   r9   r  r>  r8   rh   r-  r*  r  r@  r   pointersr  )rX   r   r=   rO  rP  r  r   rp   r  r   r  r  r  rE  ptrptrr  r  s   &&&&&            rC   rZ  9_make_flattening_iter_cls.<locals>.FlatIter.init_specific  s{   ++EJJ:xxzz --gyy$G!--YYW-A-A%**BG**.NO #..YYW-A-A%**BG**.NO $55g6=6H6HJ	 !;C$11'CHF$11'SIFMM$/MM$/  &{H#*#8#8x#NL ,,WlCCg&7&7C DC '  ' (!* DCCs   *!G++G<c           
       < VP                   p\        P                  ! W$P                  V4      p\        P                  ! W$P                  V4      pV P
                  p	V P                  p
VP                  \        P                  ^ 4      pVP                  R4      p\        P                  ! W"P                  V P                  4      4      p\        P                  ! W-4      ;_uu_ 4        VP                  R4       VP!                  V4       RRR4       VP                  R4       \        P"                  ! W*V^,
          4      pVP                  V4      p\%        WW?4      pSR8X  d   VP'                  V4       M~\)        V4       Uu. uF*  pVP                  \        P"                  ! VV	V4      4      NK,  	  pp\        P*                  ! VV4      pVP'                  \        P,                  ! VVV.4      4       \/        \)        V4      4       EFX  p\        P"                  ! W)V4      p\        P0                  ! VVP                  V4      4      pVV,          pVV,          pVP3                  RVV4      p\        P4                  ! VV4      ;_uu_ 4        VP7                  VV4       \        P"                  ! W*V4      pVP                  V4      p\        P8                  ! W/V4      pVP7                  VV4       \)        V^,           V4       F-  p\        P"                  ! VV
V4      pVP7                  VV4       K/  	  VP!                  V4       RRR4       VP7                  VV4       EK[  	  VP7                  \        P:                  V P                  4       VP!                  V4       VP=                  V4       R#   + '       g   i     EL; iu upi   + '       g   i     L; i)r   rW  FNTr3  r&  )rp   r	   r   re   r   r   r  r   r   r   r  r  r>   r  r  r(  r  rh   r   r+  r8   rj   r  r<  r,  r'  r?  r-  r  r@  r  )rX   r   r=   rO  rP  r.  rp   r  r   r   r  r  rD  is_exhaustedlast_ptrrk   r%  r  r  r  rE  r   r   r-  rF  r  	inner_dimr  s   &&&&&&                     rC   r  =_make_flattening_iter_cls.<locals>.FlatIter.iternext_specific  s   zz --gyy$G!..wTJ,,==++EJJ:2259  '22\\$..9 ;((??$$U+NN5) @   & #//4!8Lll8,!'E?6>MM%( +0+7 +63  '||G,@,@AHAD-F  G +6  7  '11'7CHMM55g7?6GIJ $E$K0C$11'CHF!11'29,,v2FHC #3KE$S\F ' 3 3Ce DI **7I>>c62!(!5!5g!M%ll62%11'Gc62).sQw)=I%,%9%9':B:C&EF $MM#v6	 *>
  u- ? MM$// 14 g//@u%''.k @??7& ?>s   &#N30OB9O3O	Oc           	        VP                   p\        P                  ! W$P                  VR 7      p\        P                  ! W$P                  VR 7      p. p	\        \        V4      4       FB  p
V	P                  VP                  WWV
,          4      4       VP                  WWV
,          4      pKD  	  V	P                  4        \        P                  ! WVP                  WxVP                  V	4      pV# )r  )rp   r	   r   re   r   r<  r8   ri   uremudivreverserA  r   rB  )rX   r   r=   rO  rP  r  rp   r  r   r   r  rk   s   &&&&&&      rC   _ptr_for_index:_make_flattening_iter_cls.<locals>.FlatIter._ptr_for_index  s    zz --gyyM!..w4P #E$K0CNN7<<c{#CD#LLs<E 1 !//#((06079 
rE   c                @    V P                  WW4V4      p\        WW64      # rY  )r  r   r  s   &&&&&& rC   r  3_make_flattening_iter_cls.<locals>.FlatIter.getitem  s#    ))'EN 5>>rE   c                F    V P                  WW4V4      p\        WW6V4       R # rY  )r  r   r  s   &&&&&&& rC   r  3_make_flattening_iter_cls.<locals>.FlatIter.setitem	  s"    ))'EN7U3?rE   )r  r   r  N)rs   rt   ru   rv   r  rZ  r  r  r  r  rx   ry   r  s   @rC   FlatIterr    s-     +BC/J"?@ @rE   r  )r3  r9  )ra   rB  r	   r}   )r6  r  ra   r  r  s   &f   rC   r5  r5  7  sr    ****&&JCD	@'"="=j"I D	@L #"E	@w22:> E	@N rE   r3  c                 6   \        \        P                  ! V4      4      pV! W4      pW5n        V P	                  V4      pV! WVP                  R 4      R7      pVP                  WW#4       VP                  4       p\        W\        P                  ! V4      V4      # r   )rY   )	r7  r   NumpyFlatTyper   r~   rg   rZ  r  r   )r   r=   rO  rP  flatiterclsflatiterarrclsr  s   &&&&    rC   make_array_flatiterr    s    %e&9&9%&@AK7,HN&F
x'@'@'I
JC7U8



CWu/B/B5/I3OOrE   c                     VP                   w  pVw  p\        V4      pV! WVR 7      pVP                  pV P                  V4      p	V	! WVP                  R 7      p
VP                  WWV4       R# r$  N)r  r7  ra   r~   r   r  )r   r=   rZ   r  r.  r6  r   r  rO  r  rP  s   &&&&&      rC   iternext_numpy_flatiterr     si     88LZJX%j1K78<H!!E&F

8CwVDrE   c                    VP                   ^ ,          pVw  rV\        V4      pV! WVR7      pVP                  pV P                  V4      p	V	! WVP                  R7      p
VP                  WWV4      p\        WVP                  V4      # r   r$  )r  r7  ra   r~   r   r  r   r  )r   r=   rZ   r  r6  r   r  r  rO  r  rP  r  s   &&&&        rC   iternext_numpy_getitemr  0  s~    !JOH%j1K78<H!!E&F

8C


7U
?CWsDDrE   c                    VP                   ^ ,          pVw  rVp\        V4      pV! WVR7      pVP                  p	V P                  V	4      p
V
! WVP                  R7      pVP                  WWWg4       V P                  4       # r  )r  r7  ra   r~   r   r  ry  )r   r=   rZ   r  r6  r   r  r%  r  rO  r  rP  s   &&&&        rC   iternext_numpy_getitem_anyr
  @  s}     !J!HU%j1K78<H!!E&F

8CWu5@""$$rE   c                     VP                   ^ ,          p\        V4      pV! WV^ ,          R7      pV P                  VP                  4      pV! WVP                  R7      pVP
                  # r  )r  r7  r~   ra   r   r   )	r   r=   rZ   r  r6  r  r   r  rP  s	   &&&&     rC   iternext_numpy_getitem_flatr  Q  sY    !J%j1K747;H
 5 56F

8C::rE   c                 F   VP                   w  pVw  p\        \        P                  ! V4      4      pV! W4      pWWn        V P                  V4      pV! WVP                  R 4      R7      pVP                  WWE4       VP                  4       p	\        WVP                  V	4      # r  )r  r;  r   NumpyNdEnumerateTyper   r~   rg   rZ  r  r   r  )
r   r=   rZ   r  rO  rP  	nditerclsrN  r  r  s
   &&&&      rC   make_array_ndenumerater  \  s    XXFEDC*5+E+Ee+LMIw(FL&F
v'>'>w'G
HC
56



CWsDDrE   c                     VP                   w  pVw  p\        V4      pV! WVR 7      pVP                  pV P                  V4      p	V	! WVP                  R 7      p
VP                  WWV4       R# r  )r  r;  ra   r~   r   r  )r   r=   rZ   r  r.  r:  rN  r  rO  r  rP  s   &&&&&      rC   iternext_numpy_nditerr  n  si     JXHV*84Iwv6FE&F

6C
Wu6BrE   c           
     p   \        VP                  V4       UUu. uF&  w  rEV P                  WV\        P                  4      NK(  	  ppp\        \        P                  ! \        V4      4      4      pV! W4      pVP                  WV4       VP                  4       p	\        WVP                  V	4      # u uppi )zndindex(*shape))r   r  r   r   r   r  NumpyNdIndexTyper   rZ  r  r   r  )
r   r=   rZ   r  argtyr  re   r  rN  r  s
   &&&&      rC   make_array_ndindexr  ~  s    
  #388T242 \\'uzz:2 
 4 !!7!7E
!CDIw(F
51



CWsDD4s   ,B2c           	        VP                   P                  pV^ 8  do   VP                  ^ ,          P                  pV^ ,          p\        P
                  ! WV4      pV Uu. uF$  pV P                  WV\        P                  4      NK&  	  ppM. p\        \        P                  ! \        V4      4      4      p	V	! W4      p
V
P                  WV4       V
P                  4       p\        WVP                   V4      # u upi )zndindex(shape))r  rp   r  r   r	   r   r   r   r   r  r  r   rZ  r  r   )r   r=   rZ   r  rp   r   rc  re   r   r  rN  r  s   &&&&        rC   make_array_ndindex_tupler    s     ??Dax!!1g$$W48!#!S gE5::>! 	 #  !7!7E
!CDIw(F
51



CWsDD#s   *C7c                 x    VP                   w  pVw  p\        V4      pV! WVR 7      pVP                  WV4       R# r  )r  r  r  )r   r=   rZ   r  r.  r:  rN  r  s   &&&&&   rC   iternext_numpy_ndindexr    s<     JXHV *Iwv6F
Wv6rE   c                b   VP                   pVP                  p\        VP                  ^ ,          \        P
                  4      '       d   \        P                  ! W^ ,          4      pM
V^ ,          .p\        V4      ! W4      pVP                  WWV4       VP                  4       p\        WWH4      # )z
nditer(...)
)r  r  r   r  r   rf  r	   r   r  rZ  r  r   )	r   r=   rZ   r  r:  r  r  rN  r  s	   &&&&     rC   make_array_nditerr    s    
 H__F#((1+u//%%gAw7q'X&w8F
6:



CWx==rE   c                 t    VP                   w  pVw  p\        V4      ! WVR 7      pVP                  WV4       R# r  )r  r  r  )r   r=   rZ   r  r.  r:  rN  s   &&&&&  rC   iternext_numpy_nditer2r    s7     JXHVX&wvFF
Wv6rE   c                     VP                   w  rE\        P                  ! \        P                  ! ^4      \	        WE8H  4      4      p\        WVP                  V4      # r  )r  r   r   r  r   r!   r  )r   r=   rZ   r  arg1arg2r  s   &&&&   rC   dtype_eq_implr"    s?    JD
++bjjmS%6
7CgEErE   c           	        \        V4      pV! W4      pV P                  VP                  4      pV P                  \        P
                  \        W4      4      pV P                  \        P
                  ^4      p\        \        P                  ! ^4      ^ 4      p	V FG  p
VP                  W4      pVP                  V^ 4      pVP                  WP                  V^4      4      p	KI  	  VP                  ^ 8X  d   R
pMVP                  R8X  dZ   V.p\        VR,          4       F+  pVP!                  VP#                  VR,          V4      4       K-  	  \%        \        V4      4      pMxVP                  R8X  dD   V.pVRR  F+  pVP!                  VP#                  VR,          V4      4       K-  	  \%        V4      pM$\'        RP)                  VP                  4      4      hVP                  W4      pVP                  V^ 4      pVP                  WP                  V^4      4      p	VP+                  V	RR7      ;_uu_ 4        V P,                  P/                  V\0        R4       RRR4       VP                  pV P3                  V4      pV P                  \        P4                  V4      pV P7                  4       VV3p\        P8                  ! \        P:                  4      p\        P<                  ! \?        V4      4      p\A        VV\        P
                  \        P4                  4      pV PC                  V\D        VV4      pV PF                  PI                  VV4      pV PK                  \        P
                  4      p\L        PN                  ! WVR7      p\L        PN                  ! WVR7      p\Q        VVPS                  VVPU                  4       4      VVVVR	7       V#   + '       g   i     EL; i)zUtility function used for allocating a new array during LLVM code
generation (lowering).  Given a target context, builder, array
type, and a tuple or list of lowered dimension sizes, returns a
LLVM value pointing at a Numba runtime allocated array.
r   r  r%  Nz3Don't know how to allocate array with layout '{0}'.Frs  r  r;  rr   r\  )z[array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.)+r~   r   r   r   r   r   r   r   r   r  smul_with_overflowrm  r)  rp   rB  r<  ri   r   r   rQ   r   r)  ru  rv  r   get_preferred_array_alignmentuint32ry  MemInfoPointervoidptrTypeRefr9   r#   r>  _call_allocatorr
  meminfo_datar   r	   rj   r   rx  r=  )r   r=   r  r  r8  r  datatyper   arrlenoverflowr   arrlen_multr   dimension_sizeallocsize_multr  r   	align_valr   r  miparytypeclassargtypesr   r   r   shape_arraystrides_arrays   &&&&                        rC   r@  r@    s)     F

"C$$W]]3H##EJJW0NOH !!%**a0F

1q)H00;&&{A6;;++K;
  ||q	3	*&vbz2NNN7;;wr{NCD 3)*	3	*$SbkNNN7;;wr{NCD *.!AHH ! 	!
 //AN%%na8I{{8%:%:>1%MNH	%	0	0 	))Z-	
 
1 MME55e<I  y9E##%y%8D


u}}
-C==g/LlEJJEH&&w4PG;;##GW5D##EJJ/F$$W@K&&wFCM3h.A.A.CD$($"$ JA 
1	0	0s   :"OO&		_allocatec                    R pV# )zLImplements a Numba-only default target (cpu) classmethod on the array
type.
c                     \        W4      # rY  )intrin_alloc)clsr  r   s   &&&rC   r    _ol_array_allocate.<locals>.impl,  s    I--rE   rr   )r<  r  r   r   s   &&& rC   _ol_array_allocater>  '  s    
.KrE   c                $    V P                  W4      # )z9Trampoline to call the intrinsic used for allocation
    )r8  )r  r   r   s   &&&rC   r*  r*  1  s     T))rE   c                n    R p\         P                  ! \         P                  4      p\        WAV4      pWS3# )z3Intrinsic to call into the allocator for Array
    c                 F    Vw  rEV P                   P                  WV4      pV# rY  )r
  meminfo_alloc_aligned)r   r=   r#   r  r  r   r   s   &&&&   rC   r  intrin_alloc.<locals>.codegen;  s%    !++33GNrE   )r   r'  r(  r#   )r  r  r   r  r3  rZ   s   &&&   rC   r;  r;  7  s1    
 

u}}
-C
CE
*C<rE   c           	        R p\        V\        P                  4      '       d&   ^pV P                  WV\        P                  4      .pMF\        V\        P
                  4      '       g   Q hVP                  p\        P                  ! WVR7      p. pV F&  pVP                  V! WVP                  V4      4       K(  	  V P                  V\        P                  ^ 4      p	\        V4       Fd  p
VP                  RWz,          V	4      p\        P                  ! W4      ;_uu_ 4        V P                  P!                  V\"        R4       RRR4       Kf  	  V#   + '       g   i     K{  ; i)z3
Parse the shape argument to an array constructor.
c                T   V P                  \        P                  4      pVP                  p\        P
                  ! V4      p\        V^V^,
          ,          ^,
          4      pVP                  V8  d   VP                  W64      pV# VP                  V8  d~   VP                  RW74      p	VP                  V	RR7      ;_uu_ 4        V P                  P                  V\        R4       RRR4       VP                  V8  d   VP                  W64      pV# TpX#   + '       g   i     L8; i)z0Cast src to intp only if value can be maintained>Frs  N)z#Cannot safely convert value to intp)r   r   r   rG   r   r  r   sextr'  r)  ru  rv  r   trunc)
r   r=   src_tr  r   
intp_widthintp_irmaxvalr  	is_largers
   &&&&      rC   safecast_intp#_parse_shape.<locals>.safecast_intpI  s    ''

3\\
**Z('Q*q.%8A$=?;;#,,s,C 
 [[J&++C=I599!!11Z< :
 {{Z'mmC1 
 
 :9s   "DD'	r  r&  N)znegative dimensions not allowed)r   r   r   r   r   rf  r   r	   r   ri   r9   get_constant_genericr8   r'  r  ru  rv  r   )r   r=   r\  r   rN  rp   passed_shapesr  r   r  r  is_negs   &&&&        rC   _parse_shaperS  E  s   * "emm$$ gB

CD"eoo....xx,,WFFmGaffa@A  ''Q?DT{$$S&+t<  11--%I 21  M 211s   #"EE$c                n    VP                   ^ ,          pV^ ,          pVP                  pV\        WWE4      3# )zD
Parse the arguments of a np.empty(), np.zeros() or np.ones() call.
)r  r  rS  )r   r=   rZ   r  arrshapetypearrshaper  s   &&&&   rC   _parse_empty_argsrW  u  s5     88A;LAwHooGL<JJJrE   c                ,   VP                   ^ ,          p\        V\        P                  4      '       dU   \	        V4      ! WV^ ,          R7      p\
        P                  ! WP                  VP                  R7      pVP                  V3# VP                  R3# )zS
Parse the arguments of a np.empty_like(), np.zeros_like() or
np.ones_like() call.
r$  r  rr   )
r  r   r   r   r~   r	   r   re   rp   r  )r   r=   rZ   r  arytyper  r  s   &&&&   rC   r  r    so    
 hhqkG'5;;''!'$q'B%%gyyM&&""rE   c                 ~    \        V\        P                  4      '       d   R V  R2p\        P                  ! V4      hR# )zIf np.z0 dtype is a string it must be a string constant.N)r   r   UnicodeTyper   r   )fnamer   r   s   && rC   _check_const_str_dtyper]    s:    %**++ugMN  %% ,rE   c                 8    VP                   pV! WV4      pR  pWV3# )c                 V    \        WW#4      w  rE\        WWE4      pVP                  4       # rY  )rW  r@  r  rm  r=   rZ   rn  r  r  r  s   &&&&   rC   r  numpy_empty_nd.<locals>.codegen  s(    +ECHUW=}}rE   instance_type)rq  ty_shapety_dtypety_retty_refty_rettyrZ   r  s   &&&&   rC   numpy_empty_ndrh    s(    ))H
8|
4C <rE   c                   a \        R V4       V\        J gF   \        V\        P                  4      '       d   VP
                  \        J g   \        V4      '       d   \        P                  pM\        V4      p\        V 4      pVe,   Ve(   \        P                  ! W#RR7      o\        3V3R llpV# RV  RV R2p\        P                  ! V4      h)rY  r   r:  c                    < \        WS4      # rY  )rh  )re   r   r  s   &&rC   r   ol_np_empty.<locals>.impl  s    !%66rE   z.Cannot parse input types to function np.empty(r  r  )r]  floatr   r   Function
typing_keyr   doublety_parse_dtypety_parse_shaper   r   r   )re   r   nb_dtyperp   r   r   r  s   &&    @rC   ol_np_emptyrs    s    7E*	E5>>	*	*u/?/?5/H<<!%(% D 0(cB# 	7>ugRwaP  %%rE   c                 8    VP                   pV! WV4      pR  pWV3# )c                 V    \        WW#4      w  rE\        WWE4      pVP                  4       # rY  )r  r@  r  r`  s   &&&&   rC   r  $numpy_empty_like_nd.<locals>.codegen  s(    0MUW=}}rE   rb  )rq  ty_prototypere  rf  rg  rZ   r  s   &&&&   rC   numpy_empty_like_ndrx    s(    ))H
<<
8C <rE   c                   a \        R V4       \        V4      '       g   \        V4      pM/\        V \        P
                  4      '       d   V P                  pMT pVem   \        V \        P
                  4      '       d4   V P                  R8w  d   V P                  MRpV P                  W#RR7      oM8\        P
                  ! V^ R4      oMRV  RV R2p\        P                  ! V4      hR	V3R llpV# )
r  r  r   F)r   rB  r  z3Cannot parse input types to function np.empty_like(r  r  c                    < \        WS4      # rY  )rx  )rP  r   r  s   &&rC   r   ol_np_empty_like.<locals>.impl  s    "3u55rE   rY  )r]  r   rp  r   r   r   r   rB  r  r   r   )rP  r   rr  rB  r   r   r  s   &&    @rC   ol_np_empty_liker|    s    </u!%(	C	%	%99c5;;''#&::#4SZZ#FHH8UHKEKK!S1E  #uBugQ0  %%6KrE   c                 :    \         P                  ! V4      pR  pW#3# )c                     \        VP                  ^ ,          4      ! WV^ ,          4      p\        P                  ! WP                  VP                  VP                  VP                  4      ^ 4       R# r  )r~   r  r	   r  r   r   r   r   )rm  r=   rZ   rn  r  s   &&&& rC   r  (_zero_fill_array_method.<locals>.codegen  sI    !%efQi@w'++cllCJJ*O	rE   )r   r  )rq  rX   rZ   r  s   &&  rC   _zero_fill_array_methodr    s    
**T
C <rE   
_zero_fillc                    R pV# )z?Adds a `._zero_fill` method to zero fill an array using memset.c                     \        V 4       R # rY  )r  r~  s   &rC   r    ol_array_zero_fill.<locals>.impl  s
    %rE   rr   )rX   r   s   & rC   ol_array_zero_fillr    s    &KrE   c                 2    \        R V4       \        3R lpV# )r  c                 T    \         P                  ! WR 7      pVP                  4        V# rW  )r  rY  r  )re   r   rP  s   && rC   r   ol_np_zeros.<locals>.impl  s    hhu*
rE   )r]  rl  re   r   r   s   && rC   ol_np_zerosr    s    7E*  KrE   c                 (    \        R V4       RR lpV# )
zeros_likec                 T    \         P                  ! WR 7      pVP                  4        V# r  )r  r  r  )rK  r   rP  s   && rC   r   ol_np_zeros_like.<locals>.impl  s    mmA+
rE   rY  r]  r  s   && rC   ol_np_zeros_liker    s    </ KrE   c                 (    \        R V4       RR lpV# )	ones_likec                     \         P                  ! WR 7      pVP                  p\        \	        V4      4       F  p^W4&   K	  	  V# r  r  r  r3  r8   r   )rK  r   rP  arr_flatr   s   &&   rC   r   ol_np_ones_like.<locals>.impl	  s8    mmA+88X'CHM (
rE   rY  r  r  s   && rC   ol_np_ones_liker    s    ;. KrE   c                 n   a \        R V4       \        V4      '       g   \        V4      oMVoRV3R llpV# )fullc                    < \         P                  ! V S4      pVP                  p\        \	        V4      4       F  pWV&   K	  	  V# rY  r  rY  r3  r8   r   )re   
fill_valuer   rP  r  r   rr  s   &&&   rC   r  impl_np_full.<locals>.full  s;    hhuh'88X'C&SM (
rE   rY  )r]  r   rp  )re   r  r   r  rr  s   &&& @rC   impl_np_fullr    s3    65)u!%( KrE   c                 (    \        R V4       RR lpV# )r  c                     \         P                  ! W4      pVP                  p\        \	        V4      4       F  pWV&   K	  	  V# rY  r  )rK  r  r   rP  r  r   s   &&&   rC   r  $impl_np_full_like.<locals>.full_like'  s8    mmA%88X'C&SM (
rE   rY  r  )rK  r  r   r  s   &&& rC   impl_np_full_liker  #  s    ;. rE   c                 (    \        R V4       RR lpV# )onesc                     \         P                  ! WR 7      pVP                  p\        \	        V4      4       F  p^W4&   K	  	  V# r  r  )re   r   rP  r  r   s   &&   rC   r   ol_np_ones.<locals>.impl7  s8    hhu*88X'CHM (
rE   rY  r  r  s   && rC   
ol_np_onesr  1  s     65) KrE   c                    a \        R V4       \        V4      '       g   \        V4      oM\        P                  oRV3R llpV# )identityc                 h   < \         P                  ! W 3S4      p\        V 4       F	  p^W#V3&   K  	  V# r  )r  r  r8   )r]  r   rP  rm   rr  s   &&  rC   r  "impl_np_identity.<locals>.identityH  s3    hhvx(qAC1I 
rE   rY  )r]  r   rp  r   ro  )r]  r   r  rr  s   && @rC   impl_np_identityr  @  s7    :u-u!%(<<
 OrE   c                     R # rY  rr   NMs   &&rC   _eye_none_handlerr  P  ru  rE   c                 V    \        V\        P                  4      '       d   R  pV# R pV# )c                     V # rY  rr   r  s   &&rC   r   $_eye_none_handler_impl.<locals>.implW      HrE   c                     V# rY  rr   r  s   &&rC   r   r  Z  r  rE   )r   r   rT  )r  r  r   s   && rC   _eye_none_handler_implr  T  s)    !U^^$$	
 K	KrE   c                 ^  a Ve!   \        V\        P                  4      '       d   \        P                  ! \
        4      oM]\        V\        P                  \        P                  34      '       d   \        \        VRV4      4      oM\        P                  ! V4      oR ^ \
        3V3R llpV# )Nr   c                 "  < \        W4      p\        P                  ! W3S4      pV^ 8  d3   \        WV,
          4      p\	        V4       F  p^WWWr,           3&   K  	  V# \        W,           V4      p\	        V4       F  p^WWV,
          V3&   K  	  V# r   )r  r  r  r  r8   )	r  r  r   r   _MrP  drm   r  s	   &&&&    rC   r   numpy_eye.<locals>.implj  s    q$hhw#6AAvA1X !quH  
 AE2A1X !E1H 
rE   )
r   r   rT  r  r   rl  	DTypeSpecr  r   r  )r  r  r   r   r   r  s   &&&& @rC   	numpy_eyer  _  st     }
5%..99XXe_	EEOOU\\:	;	;geWe45XXe_!5  KrE   c                     \        V 4      '       g   \        P                  ! R 4      h\        V \        P
                  4      '       d/   V P                  R9  d   \        P                  ! R4      hRR lpV# R# )#The argument "v" must be array-likezInput must be 1- or 2-d.c                    V P                   ^8X  d   V P                  pV^ ,          \        V4      ,           p\        P                  ! W33V P
                  4      pV^ 8  d-   \        W1,
          4       F  pW,          WEW,           3&   K  	  V# \        W1,           4       F  pW,          WEV,
          V3&   K  	  V# V P                  w  rgV^ 8  d	   Wa,           pV^ 8  d	   Wq,
          p\        \        Wg4      ^ 4      p\        P                  ! W0P
                  4      pV^ 8  d'   \        V4       F  pWW,           3,          WE&   K  	  V# \        V4       F  pWV,
          V3,          WE&   K  	  V# r  )
rp   re   r7  r  r  r   r8   r  r  rY  )r   r   r   r]  r  rm   rowscolss   &&      rC   	diag_implimpl_np_diag.<locals>.diag_impl  s,   vv{GGaD3q6Mhhvqww/6"15\()quH *
 
 #15\()E1H *
WW
q58Dq58DD+hhq''*6"1X!"ae8 &
 
 #1X!"q5!8 &
rE   N)r  rq  r   )r   r   r   r   r   r   rp   NumbaTypeError)r   r   r  s   && rC   impl_np_diagr  y  s`    A  !FGG!U[[!!66''(BCC	6 ? "rE   c                 4  aa \        V \        P                  4      '       g   R p\        P                  ! V4      h\        V P
                  \        P                  4      '       g   R p\        P                  ! V4      h\        V 4      oRS,          oVV3R lpV# )z5The argument "dimensions" must be a tuple of integersc                   < \         P                  ! S3V ,           \         P                  R 7      p^ pV  FO  p\         P                  ! V\         P                  R 7      P	                  \        SW#4      4      pWAV&   V^,          pKQ  	  V# r  )r  rY  r  aranger  r/   )
dimensionsr  rm   r  r   r  re   s   &    rC   r   numpy_indices.<locals>.impl  so    hhtj(9C))Crxx088eQ,C FFA  
rE   r  )r   r   r  r   r   r   r   r   )r  r   r   r  re   s   &  @@rC   numpy_indicesr    su    j%..11E  %%j&&66E  %%JA1HE
 KrE   c                     \        V 4      '       g   R p\        P                  ! V4      h\        V\        \
        P                  34      '       g   Rp\        P                  ! V4      hRR lpV# )r  z#The argument "k" must be an integerc                    \         P                  ! V 4      p V P                  4       p \        V 4      p\	        V4      pW#,           p\         P
                  ! WD3V P                  4      p\         P                  ! ^ V) 4      p\         P                  ! ^ V4      p\        V4       F  pW,          WVV,           Wx,           3&   K  	  V# r   )	r  r  r  r   r7  r  r   maximumr8   )	r   r   r   abs_kr]  r  rm   jts	   &&       rC   r   numpy_diagflat.<locals>.impl  s    JJqMGGIFAIhhvqww'JJq1"JJq!qA !CAqu  
rE   r   )r   r   r   r   r   r   r   )r   r   r   r   s   &&  rC   numpy_diagflatr    s[    A3  %%a#u}}-..3  %% KrE   c                    VR
9   g   Q hVR 8X  d?   Rp\        ^V 4       F+  pRV,          pVRV RRP                  V4       R2,          pK-  	  M=Rp\        ^V 4       F+  pRV,          pVRV RRP                  V4       R2,          pK-  	  \        P                  ! V4      p\	        V\        4       4       \        4       R	V 2,          p\        V4      # )r  zv
            def _getitem(a, idx, axis):
                if axis == 0:
                    return a[idx, ...]
        z
                elif axis == z:
                    return a[r  z, idx, ...]
            z|
            def _setitem(a, idx, axis, vals):
                if axis == 0:
                    a[idx, ...] = vals
        z:
                    a[z, idx, ...] = vals
            rH  )r  r  ):)r8   r  textwrapdedentexecglobalsr%   )rp   r  r  rm   lsts   &&   rC   "generate_getitem_setitem_with_axisr    s    ))))y
 q$A1*C S !"iin- . B   q$A1*C S !yy~& ' B   
	BWY	Qtf:	BBrE   takec                 D  aaaaa	 \         P                  ! V4      '       d   \        V \        P                  4      '       d(   \        V\        P
                  4      '       d   R
R lpV# \        V \        P                  4      '       d:   \        V\        P                  4      '       d   VP                  R8H  oR
V3R llpV# \        V \        P                  4      '       d:   \        V\        P                  \        P                  34      '       d   R
R lpV# R # R # \        V \        P                  4      '       dT   \        V\        P
                  4      '       d4   RV P                  ^,
          ,          o	\        V	3R l4       oR
V3R llpV# \        V \        P                  4      '       dq   \        V\        P                  \        P                  \        P                  34      '       d0   V P                  p\        VR4      o\        VR4      oR
VV3R	 llpV# R # R # )Nc                     WP                   ^,
          8  g   WP                   ) 8  d   \        R4      hV P                  4       V,          # )r  Index out of bounds)r   
IndexErrorr  )rK  r   r   s   &&&rC   	take_implnumpy_take.<locals>.take_impl   s8    ffqj)Ww->$%:;;wwy))rE   r%  c                   < \         P                  ! VP                  V P                  R 7      pS	'       d   VP	                  4       pMTp\         P
                  ! V4      p^ pV P                  4       pV FI  pWP                  ^,
          8  g   WP                  ) 8  d   \        R4      hWx,          W6&   V^,           pKK  	  VP                  VP                  4      # )rW  r  )
r  rY  r   r   r  rN  r  r  r  re   )
rK  r   r   r  walkeritrm   r3  r  F_orders
   &&&      rC   r  r  	  s    hhw||177;$\\^F$FYYv&wwyAFFQJ'1w;()>??!WCFAA	 
 {{7==11rE   c                 Z    \         P                  ! V4      p\         P                  ! W4      # rY  )r  r   r  )rK  r   r   converts   &&& rC   r  r    s    ((7+wwq**rE   c                 p  < \        S4      p^ pV\        V P                  4      8  d   V P                  V,          ^8X  g   Q V P                  4       h\        \        V P                  4      4       F3  pV P                  V,          pWA8w  g   K  \	        W#V4      pV^,          pK5  	  V P                  V4      # r   )r   r   re   r8   r/   r  )r  r   rc  r  r   r   r  s   &&    rC   _squeezenumpy_take.<locals>._squeeze'  s    Ahc!''l*qwwt}/AJ177JA QWW.CA{+CA6Q	 /
 yy~%rE   c                    < \         P                  ! W3VR 7      pV P                  ^8X  d
   V^ ,          # V^ 8  d   W P                  ,          pS! W24      # r  )r  r  rp   )rK  r   r   r  r  s   &&& rC   r  r  3  sH    GGAz566Q; Q4K!8FFND((rE   r  r  c                   < TpV^ 8  d   W P                   ,          pV^ 8  g   W P                   8  d   RV RV P                    2p\        V4      h\        V P                  V\	        V4      4      p\
        P                  ! WPP                  R7      p\        \	        V4      4       F  pS	! WV,          V4      pS
! WgW(4       K  	  V# )r   zaxis z) is out of bounds for array of dimension rW  )	rp   r   r/   re   r   r  rY  r   r8   )rK  r   r   r   r   re   r  rm   r  _getitem_setitems   &&&      rC   r  r  J  s    !8FFND!8tvv~"2$ '++,66(4C$S/)%aggtS\BhhuGG4s7|,A AJ5AST- - 
rE   rY  r   )r	   r   r   r   r   r   rB  rb  rf  rp   r%   r  )
rK  r   r   r  rp   r  r  r  r  r  s
   &&&  @@@@@rC   
numpy_taker    s    4  a%%*Wemm*L*L* a%%*Wekk*J*Jnn+G2 a%%7UZZ$ABB+ 	 C & a%%*Wemm*L*L
#A
 	& 	&) a%%7U[[%**eoo$NOO66D9$	JH9$	JH   / P &rE   c                     V  Uu. uF'  p\        V\        P                  4      '       d   K%  VNK)  	  pp\        ;QJ d    R  V 4       F  '       g   K   RM	  RM! R  V 4       4      '       d   \        P                  pV# \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        P
                  pV# \        \        R^\        P                  ! \        4      P                  ,          ,          4      pV Uu. uF  p\        P                  ! V4      NK  	  pp\        Wd.,           4      pV# u upi u upi )c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  ri  r[  rK  s   & rC   r]   _arange_dtype.<locals>.<genexpr>`  s     
8A:a''r_  TFc              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  )r   r   Floatr  s   & rC   r]  r  b  s     8AZ5;;''r_  zint%s)r   r   rT  r`  
complex128r   r  r  r   r   r   	unliteralr  )r  rK  boundsr   NPY_TYr  unliteral_boundss   *      rC   _arange_dtyper  ]  s    CAZ5>>%BaaFC
s
8
8sss
8
888  & L% 
8888	8	8" L 1rxx}/E/E+E FG 9??1EOOA.?$y01L- D& @s   "EEE
c          	      @  aaaa	a
 \        V\        P                  4      '       d   VP                  p\        V\        P                  4      '       d   VP                  p\        V\        P                  4      '       d   VP                  pVf   \        P                  pVf   \        P                  pVf   \        P                  p\        V \        P
                  4      '       d   \        V\        P                  \        P
                  34      '       da   \        V\        P                  \        P
                  34      '       d1   \        V\        P                  \        P                  34      '       g   R # \        V\        P                  4      '       d   \        WV4      o	MVP                  o	\        WV3 Uu. uF  p\        V\        P                  4      NK  	  up4      o
\        V RR 4      o\        VRR 4      o\        VRR 4      oRVVVV	V
3R llpV# u upi )Nr   c                  < Se   SMT pSe   SMTpSe   SMTpVe   TM^pVf   ^ TrMYErV^ 8X  d   \        R4      hW,
          V,          p
\        \        P                  ! V
P                  4      4      pSRJ d@   \        \        P                  ! V
P
                  4      4      p\        \        W4      ^ 4      pM\        V^ 4      p\        P                  ! VS4      pTp\        V4       F  pVVV,          ,           VV&   K  	  V# )NzMaximum allowed size exceededT)r   r   mathceilrr  rt  r  r  r  rY  r8   )r=  r  r  r   	lit_startlit_stoplit_step_step_start_stopnitems_cnitems_rnitems_ir   rP  r   rm   start_value
step_value
stop_value
true_dtypeuse_complexs   "&&&             rC   r   np_arange.<locals>.impl  s    #.#:K	!+!7:T!+!7:T$0ayE%EA:<==Ne+tyy/0 $499X]]34HX0!4F1%Fhhvz*vAAI&CF 
rE   r"  )r   r   Optionalr9   r  r  rT  r  r  r   r`  rj  r  )r=  r  r  r   r  r   r  r  r  r  r  s   "&&&  @@@@@rC   	np_aranger  w  s{   $''yy$''yy%((

|zz|zz}

uell++tennell;<<tennell;<<55>>5??"CDD%(("55
[[
!&d 35 31 "!U]]3 35 6K %$7K5J5J < KK5s   <#Hc                   a \         ;QJ d    R  W3 4       F  '       d   K   RM	  RM! R  W3 4       4      '       g   R# \        V\        \        P                  34      '       g   Rp\
        P                  ! V4      h\        ;QJ d    R W3 4       F  '       g   K   RM	  RM! R W3 4       4      '       d   \        P                  oM\        P                  oRV3R llpV# )c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  )r   r   r  rk  s   & rC   r]  !numpy_linspace.<locals>.<genexpr>  s     Fz#u||,,r_  FTNrg  c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  ri  rk  s   & rC   r]  r    rm  r_  c                 0  < \         P                  ! VS4      pV R ,          p VR ,          pV^ 8X  d   V# V^,
          pV^ 8  dD   W,
          p\         P                  ! WT4      p\        ^ V4       F  pWV,          ,           W7&   K  	  MW^ &   V^8  d   WR&   V# )g      ?r\  )r  rY  divider8   )	r=  r  ra  rP  divdeltar  rm   r   s	   &&&     rC   r_   numpy_linspace.<locals>.linspace  s    hhsE" cz!8JAg7LE99U(D1c]d(+ # F7G
rE   rc  )
r  r   r   r   r   r   r   r`  r  r   )r=  r  ra  r   r_  r   s   &&&  @rC   numpy_linspacer    s    3FF333FFFFcC/005  %%
s
Ce]
Csss
Ce]
CCC  , OrE   c                   VP                   ^ ,          p\        V4      ! WV^ ,          R7      p\        P                  ! WP                  4      pVP
                  p\        WWv4      pVP                  p	VP                  p
VP                  R9   g   Q hVP                  VP                  8X  d0   \        P                  ! WWP                  VP                  ^R7       M\        P                  ! WP                  4      p\        P                  ! WP                  4      pV P                  \        P                  4      p\        P                   ! WV4      ;_uu_ 4       p\        P"                  ! WV	WkVP                  V4      p\        P"                  ! WV
WlVP                  V4      pVP%                  VP'                  V4      V4       RRR4       \)        WVP
                  VP+                  4       4      #   + '       g   i     L5; i)z
Array copy.
r$  rN  r   N)r  r~   r	   r   re   r  r@  r   rB  
raw_memcpyr   r   r   r   r   r   r~  rA  r-  r>   r    r  )r   r=   rZ   r  rY  r  r  rettyper  rp  r  rr  r  r   r   rh  r  s   &&&&             rC   _array_copyr"    s{    hhqkG
W
gd1g
>C!!'995FooG
7
;CxxHI>>T!!!~~'7x<<q	2 **7KK@++G[[A''

3w777//(0607IG 0091718JH MM',,w/: 8 Gcoos}}OO 87s   A*G00H 	c                     \        V\        P                  4      '       g   Q hVP                  R 8X  d   R MRpVP	                  VRR7      pV! V4      pV\
        3# )r%  r   F)rB  r  )r   r   r   rB  r  r"  )r  rK  rB  r  rZ   s   &&   rC   _array_copy_intrinsicr$    sP    a%%%%HHOSF
&&&
/C
a&CrE   z
array.copyc                     \        WW#4      # rY  )r"  r3  s   &&&&rC   
array_copyr&    s    w33rE   c                     \        V 4      '       g   \        P                  ! R 4      h\        V \        P
                  4      '       d   R pV# R pV# )r  c                     \        V 4      # rY  )r$  r  s   &rC   
numpy_copy#impl_numpy_copy.<locals>.numpy_copy  s    (++rE   c                 .    \         P                  ! V 4      # rY  )r  r  r  s   &rC   r)  r*     s    ::a= rE   )r   r   r   r   r   r   )rK  r)  s   & rC   impl_numpy_copyr,    sR    A   "1 2 	2 !U[[!!	, 	! rE   c                   VP                   pVP                  ^ ,          pVP                  V8X  g   Q R4       hVP                  ^ 8X  Ed   VP                  ^8X  g   Q h\	        V4      ! WV^ ,          R7      p\	        V4      ! W4      pV P                  V\        P                  ! \        P                  ^4      R4      p	V P                  V\        P                  ! \        P                  ^4      VP                  34      p
\        WP                  WVP                  VP                  VP                  4       \        WWXP!                  4       4      # VP                  VP                  8X  g#   VP                  ^8X  d%   VP                  R9   d   \        WWS^ ,          4      # VP                  R8X  d   VR9   g   Q hVR8X  d   \"        M\$        p\'        VV VVV^ ,          4      pVP)                  V4      ;_uu_ 4       w  rV;_uu_ 4        \        WVV^ ,          4      pVP*                  pRRR4       V;_uu_ 4        \-        WW#4      pVP*                  pRRR4       RRR4       VP/                  XP0                  4      pVP3                  VX4       VP3                  XX4       V# \-        WW#4      #   + '       g   i     L; i  + '       g   i     Lx; i  + '       g   i     L; i)zX
Common logic for layout conversion function;
e.g. ascontiguousarray and asfortranarray
z return-type has incorrect layoutr$  rN  r  r   Nr  )r  r  rB  rp   r~   rP  r   r  r   r	  r   r   r   r   r   r   r  r   r   r  rf  blockr"  phir9   add_incoming)r   r=   rZ   r  output_layoutr  r   r  r  re   r   
check_funcr  thenorelseout_thenthen_blk
out_orelse
orelse_blkret_phis   &&&&&               rC   _as_layout_arrayr:  &  sA   
 OOEHHQKE<<=(L*LL(zzQzzQQ@1,,U^^EJJ2D
 $$W%*^^EJJ%B&)ll_6 	sHHecll{{CJJ	0 5--/JJ
,,%,,
&

aELLD$8 5q'BB <<3 !D(((*73*>JJ.z/6/6/4/3Aw	8I
 ++~T0515a :H&}}H 
 V!,Ws!IJ!(J  , kk(--0G  84  Z8N w;;! T
 V ,+s<   <K	!J2	*K<K	K2K=KKKK(	c                    a \        S\        P                  4      '       g   \        P                  ! S4      hVP                  SP                  \        VP                  ^4      RR7      pV! VS4      pVV3R l3# )r  F)rB  rp   r  c                 4   < \        WW#SP                  R 7      # ))r1  )r:  r   )r  r  r   rK  r1  s   &&&&rC   r  ,_as_layout_array_intrinsic.<locals>.<lambda>s  s    #3	a-"="=$?rE   )	r   r   r$   r   RequireLiteralValuer  r   r  rp   )r  rK  r1  r  rZ   s   &&f  rC   _as_layout_array_intrinsicr?  g  su    mU%8%899((77 &&**^  C a
C ? ? ?rE   c                    \        V 4      '       g   \        P                  ! R 4      h\        V \        P
                  \        P                  34      '       d   R pV# \        V \        P                  4      '       d   R pX# )r  c                 V    \         P                  ! \         P                  ! V 4      4      # rY  )r  ascontiguousarrayr   r  s   &rC   r   %array_ascontiguousarray.<locals>.impl}  s    ''44rE   c                     \        V R 4      # )r   r?  r  s   &rC   r   rC        -a55rE   r   r   r   r   r   r  r  r   rB  s   & rC   array_ascontiguousarrayrH  w  sb    A  !FGG!ellEMM344	5
 K 
Au{{	#	#	6KrE   c                    \        V 4      '       g   \        P                  ! R 4      h\        V \        P
                  \        P                  34      '       d   R pV# \        V \        P                  4      '       d   R pV# R# )r  c                 V    \         P                  ! \         P                  ! V 4      4      # rY  )r  asfortranarrayr   r  s   &rC   r   "array_asfortranarray.<locals>.impl  s    $$RXXa[11rE   c                     \        V R 4      # )r%  rE  r  s   &rC   r   rL    rF  rE   NrG  rB  s   & rC   array_asfortranarrayrN    sc    A  !FGG!ellEMM344	2	Au{{	#	#	6 
$rE   zarray.astypec                    VP                   ^ ,          p\        V4      ! WV^ ,          R7      p\        P                  ! WP                  4      pVP
                  p\        WWv4      pVP                  p	VP                  p
\        P                  ! WP                  4      p\        P                  ! WP                  4      pV P                  \        P                  4      p\        P                  ! WV4      ;_uu_ 4       p\        P                  ! WV	WkVP                  V4      p\        P                  ! WV
WlVP                  V4      p\        WWO4      pV P!                  VVVP"                  VP"                  4      p\%        WVVV4       RRR4       \'        WVP
                  VP)                  4       4      #   + '       g   i     L5; i)r   r$  N)r  r~   r	   r   re   r  r@  r   r   r   r   r   r~  rA  rB  r   r   r   r   r    r  )r   r=   rZ   r  rY  r  r  r!  r  rp  r  rr  r  r   r   rh  r  items   &&&&              rC   array_astyperQ    sW    hhqkG
W
gd1g
>C!!'995FooG
7
;CxxHI&&w<K''=L##EJJ/F			7F	3	3w++Gh,2,3NNGE ,,Wy-3-4^^WF 7<||GT7=='--H7WdH= 
4 Gcoos}}OO 
4	3s   <BF44G	c                 h    \        V\        P                  4      '       g   Q h\        V4      pR  pW#3# )c                    VP                   w  p\        V4      pV! WV^ ,          4      pVP                  pVP                  WvP                  4      p\        WV4      p	VP                  '       dY   VP                  R8X  dH   \        P                  ! WP                  VP                  VP                  V4       V	P7                  4       # \        P                  ! WP                  4      p
\        P                  ! WP                  4      pVP                  pV P                  \        P                   4      p\        P"                  ! WRRR7      p\        P$                  ! WV4      ;_uu_ 4       p\        P&                  ! WVP                  WW4      pVP)                  VV	P                  P*                  4      pVP-                  V4      pVP/                  V	P                  V.4      p\        P0                  ! VVVV4       VP3                  VP5                  VV4      V4       RRR4       V	P7                  4       #   + '       g   i     T	P7                  4       # ; i)r   r   byteptrT)namerN   N)r  r~   r   r   r   r-   r  rB  r	   r   r   r   re   r   r   r   r   rV   r~  rA  rx  r9   r>   rC  r  r-  r  r  )r   r=   rZ   r  r\  rO  rP  r   r  bstrre   r   rB  r   byteidxr   rk   srcptrr   destptrs   &&&&                rC   r  )_array_tobytes_intrinsic.<locals>.codegen  s   xx2Gd1g.<<Xzz2#Gf=NNNryyC/w		388SZZ'). ~~) (())<E**7KK@GYYF++EJJ7F))itG ""76::g//chh !diinn=ll7+!++dii#7wBgkk#x8'B ; ~~ ;: ~~s   *B3H55I	)r   r   r   r.   )r  r  rZ   r  s   &&  rC   _array_tobytes_intrinsicr[    s2    a%%%%
Q-C" F <rE   r  c                 P    \        V \        P                  4      '       d   R  pV# R# )c                     \        V 4      # rY  )r[  r  s   &rC   r    impl_array_tobytes.<locals>.impl  s    +C00rE   NrZ  r  s   & rC   impl_array_tobytesr_    s"    #u{{##	1 $rE   c                 :    VP                   pV! WW4V4      pR  pWx3# )c           
         VP                   ^ ,          pV^,          pV^,          pVP                  p\        V4      ! WV^ ,          R7      p\        V4      p	V	! W4      p
V
P                  p\	        W4      p\        VP                  P                  V4      pVP                  VP                  VP                  4      pVP                  Wm4      pVP                  W4      pVP                  RV\        P
                  ! VP                  ^ 4      4      pRpVP                  VRR7      ;_uu_ 4        V P                  P                  V\         V34       RRR4       VP                  RV\        P
                  ! VP                  ^ 4      4      pVP#                  W4      p\$        P&                  ! VV4      pVP                  VRR7      ;_uu_ 4        RpV P                  P                  V\         V34       RRR4       VP)                  V4      ;_uu_ 4       w  ppV;_uu_ 4        VP*                  pVP-                  W4      pRRR4       V;_uu_ 4        VP*                  pRRR4       RRR4       VP/                  VP                  4      pVP1                  XX4       VP1                  VX4       VP                  VV4      pVP3                  RVV4      pVP                  VRR7      ;_uu_ 4        R	pV P                  P                  V\         V34       RRR4       \$        P4                  ! VV.4      p\$        P4                  ! W.4      pVP7                  VP8                  V.4      pVP;                  VV P=                  VP?                  R
4      4      4      p\A        V
VVVVVPB                  VPD                  R7       V
PG                  4       p \I        WVP                  V 4      #   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL>; i)r   r$  r&  z=offset must be non-negative and no greater than buffer lengthFrs  Nz.buffer size must be a multiple of element sizerF  z%buffer is smaller than requested sizer   rN  )%r  r  r~   r   r   r   r   r9   r   r   r+  r'  r   r)  ru  rv  r   sremr	   is_not_nullrf  basic_blocksdivr/  r0  r*  rj   rC  r   rx  r   r   r   r   r   r  r   )!r   r=   rZ   r  bufty	arg_count
arg_offsetr   r#  
out_ary_tyout_aryout_datamodelr   ll_itemsizer  ll_offset_sizenbytes_is_negativer   ll_count_is_negativeremis_incompatible
then_block
else_blockbb_if	num_wholebb_elsell_itemcountll_required_sizeis_too_largere   r   r   r  s!   &&&&                             rC   r  np_frombuffer.<locals>.codegen  sz   G	!W
Q@&
W.**/s||00(;SZZ6 Z=V4$00KK	*
 N__/_>>--gzC6J ?  '22KK	* 
 ll6/!--gs;___U_;;BC--gzC6J <
 __1226Nz:++#LL=	  !-- 	 3 {{9>>2!!)U3!!)W5 #;;|[A,,S2BFK__\%_889C--gzC6J 9
 ""7\N;$$Wm<{{388j\2'(()?)?)GH
 	w "& +"{{!jj	* ! 3??CHHm ?>> <;;  	 322 988s`   -#O#%O7P3!P	?P3P	P3-%Q#O4	7P	P	P3P0*	P33Q	Q	rb  )	r  bufferr   r   r  r  r\  rZ   r  s	   &&&&&&   rC   np_frombufferr|    s-    			B
VE5
1CNI` <rE   c                 F  a \        R V4       \        V \        P                  4      '       d   V P                  R8w  d   RV  2p\
        P                  ! V4      hV\        J gF   \        V\        P                  4      '       d   VP                  \        J g   \        V4      '       d   \        P                  pM\        V4      pVe+   \        P                  ! V^RV P                  '       * R7      oMRV  RV R2p\
        P                  ! V4      h\        R^ 3V3R llpV# )	
frombufferr   z+Argument "buffer" must be buffer-like. Got )r   rp   rB  r  z3Cannot parse input types to function np.frombuffer(r  r  c                    < \        WW#S4      # rY  )r|  )r{  r   r   r  r  s   &&&&rC   r    impl_np_frombuffer.<locals>.implU  s    VE5AArE   r\  )r]  r   r   r  rB  r   r   rl  rm  rn  r   ro  rp  r   r  )r{  r   r   r  r   rr  r   r  s   &&&&   @rC   impl_np_frombufferr  >  s    </fell++v}}/C;F8D  %%u~~..53C3Cu3L<<!%((3)/%79  &xr%3  %% 1 B KrE   c                    a \        V4      '       d   \        R R4      oRV3R llpV# \        V\        P                  4      '       d   \        R V4      oRV3R llpV# R# )r   Nc                    < S! W4      # rY  rr   rk   re   r   intrinsic_cfarrays   &&&rC   r   impl_carray.<locals>.impl`      $S00rE   c                    < S! W4      # rY  rr   r  s   &&&rC   r   r  f  r  rE   rY  r   get_cfarray_intrinsicr   r   r  rk   re   r   r   r  s   &&& @rC   impl_carrayr  [  R    51#t<	1	E5??	+	+1#u=	1 
,rE   c                    a \        V4      '       d   \        R R4      oRV3R llpV# \        V\        P                  4      '       d   \        R V4      oRV3R llpV# R# )r%  Nc                    < S! W4      # rY  rr   r  s   &&&rC   r   impl_farray.<locals>.implp  r  rE   c                    < S! W4      # rY  rr   r  s   &&&rC   r   r  v  r  rE   rY  r  r  s   &&& @rC   impl_farrayr  k  r  rE   c                 *   a a \         VV 3R  l4       pV# )c                   < V\         P                  J d   R pMI\        V\         P                  4      '       d   VP                  pMRV R2p\
        P                  ! V4      hS	f    Vf   Rp\
        P                  ! V4      hTpMr\        S	\         P                  4      '       d7   S	P                  pVe&   WS8w  d    RV RV R2p\
        P                  ! V4      hMRS	 R2p\
        P                  ! V4      h\        V4      pVf   RV R2p\
        P                  ! V4      h\         P                  ! WVS
4      p\        WqV4      pV\        3# )Nz pointer argument expected, got ''z*explicit dtype required for void* argumentzmismatching dtype 'z' for pointer type 'zinvalid dtype spec 'zinvalid shape ')r   r(  r   CPointerr   r   r  r  rq  r   r#   
np_cfarray)r  rk   re   	ptr_dtyper   r   rp   r  rZ   dtype_rB  s   &&&      rC   r  0get_cfarray_intrinsic.<locals>.intrinsic_cfarray|  s2   %--IU^^,,		I4SE;C'',,> B++C00E00LLE$);+E72Fse1M++C00(2C'',,e$<#E7!,C'',,E0E*JrE   r(   )rB  r  r  s   ff rC   r  r  {  s     > rE   c           
        VP                   R,          w  rEVR,          w  rgVP                  pVP                  R9   g   Q h\        V4      ! W4      p	\	        W4      p
\
        P                  ! V
4      p\        V\        P                  4      '       d   \
        P                  ! W4      pMV3pV3p\        W\4       UUu. uF&  w  rV P                  WV\        P                  4      NK(  	  pppTp. pVP                  R8X  d.   V F&  pVP                  V4       VP                  VV4      pK(  	  ME\!        V4       F&  pVP                  V4       VP                  VV4      pK(  	  VP#                  4        VP%                  VV P'                  VP(                  4      P+                  4       4      p\-        V	VVVVRR7       V	P/                  4       p\1        WVP                  V4      # u uppi )zF
numba.numpy_support.carray(...) and
numba.numpy_support.farray(...).
:Nrq  NrN  r%  Nr;  )r  r  rB  r~   r   r	   r   r   r   rf  r   r   r   r   ri   r   r<  r  rx  r   r   r=  r   r  r    )r   r=   rZ   r  ro  r-  rk   re   r   rj  r   rl  r  r  r%  offr   r   r   r  s   &&&&                rC   r  r    s   
 XXb\NEbJCOOE<<41GG+H..*K'5??++%%g5*#&w#79#7-& ll765::>#7  9 CG||sANN3++c1%C  &!ANN3++c1%C " 	??3"00=HHJLD 7"' 


CGcoosCC99s   =,G$c                 F   \        V\        P                  4      '       d*   V P                  \        P                  \        V4      4      # \        V\        P                  4      '       d8   V P                  \
        \        \        P                  V4      4      pV! W34      # Q hr   )	r   r   rf  r   r   r   r  rP   r#   )r   r=   seqtyseqr'  s   &&&& rC   _get_seq_sizer    sn    %))##EJJE
;;	E5>>	*	*''Yuzz5-JK((qrE   c                   a aa VP                   oS P                  \        P                  \	        SV\
        P                  4      4      oV VV3R lpV# )zC
Return a getitem() implementation that doesn't incref its result.
c                 v   < S! W4      pSP                   '       d   SP                  P                  V SV4       V# rY  )r	  r
  decref)r=   r  r  r   r  r  s   && rC   wrap$_get_borrowing_getitem.<locals>.wrap  s4    7)KKws3
rE   )r   rP   r  r  r#   r   r   )r   r  r  r  r  s   f& @@rC   _get_borrowing_getitemr    sC     KKE''(8(8(1%

(KML KrE   c           	     
  a aa S P                  \        P                  4      p\        V^ 4      oVV V3R lp. pY4r\	        V4       F0  p
V
^ 8  d   V! W4      w  rVP                  \        S SW4      4       K2  	  \        V4      # )z>
Compute the likely shape of a nested sequence (possibly 0d).
c                    < \        V \        P                  4      '       d.   \        V 4      ^ 8X  d   R# V ^ ,          SP	                  V^ 4      3# \        SV 4      pV P                  V! SVS34      3# )r   NN)r   r   rf  r   rm  r  r   )r  r  r  r=   r   r  s   && rC   get_first_item.compute_sequence_shape.<locals>.get_first_item  sg    eU__--5zQ!!Qx!6!6sA!>>>1'5AL;;WsDk BBBrE   )r   r   r   r   r8   ri   r  r   )r   r=   rp   r  r  r   r  r  innertyinnerrm   r  s   ff&&&      @rC   compute_sequence_shaper    sy     ##EJJ/FFADC FU4[q5+G;NGmGWgEF 
 =rE   c                @   a aaa VV 3R loVVVV 3R loS! W#V4       R# )z7
Check the nested sequence matches the given *shapes*.
c                  J   < SP                   P                  S \        R4       R# )incompatible sequence shapeN)r  )ru  rv  r   )r=   r   s   rC   _fail#check_sequence_shape.<locals>._fail  s    ))':*J	LrE   c                 (  < \        V4      ^ 8X  d   R# \        SSW4      pV^ ,          pSP                  RW44      pSP                  VRR7      ;_uu_ 4        S! 4        RRR4       \        V4      ^8X  d   R# \	        V \
        P                  4      '       dg   \        SV 4      p\        P                  ! SV4      ;_uu_ 4       pV P                  pV! SWP                  34      p	S! WVR,          4       RRR4       R# \	        V \
        P                  4      '       dG   \        \        V 4      4       F,  p
W
,          pSP                  W4      p	S! WVR,          4       K.  	  R# Q T 4       h  + '       g   i     EL; i  + '       g   i     R# ; i)r   Nrr  Frs  r  )r   r  r'  r)  r   r   r  r  r	   r  r   r  rf  r8   rm  )r  r  r  r   expectedr  r  r  r  r  rm   r  r=   check_seq_sizer   s   &&&        rC   r  ,check_sequence_shape.<locals>.check_seq_size  s;   v;!Wgu:!9&&tT<__Xe_44G 5 v;!eU^^,,1'5AL""7D11T++$WsJJ.?@wvbz: 21
 u//3u:&(--c5wvbz: ' eO1) 544 211s   E,1F ,E=	 F	Nrr   )r   r=   r  r  r  r  r  s   ff&&&@@rC   check_sequence_shaper    s    
L : 5v&rE   c                R   a aaaaaaa	 VVV VVV3R lo	VV	VV 3R loS! WgSR4       R# )z`
Assign a nested sequence contents to an array.  The shape must match
the sequence's structure.
c                    < \         P                  ! SSSSS	SP                  V R R7      pSP                  SW!SP                  4      p\        SSSW#4       R# )Fre  N)r	   rA  rB  r   r   r   )
r   ri  r   rk   rO  r=   r   r   r  r   s
   &&& rC   assign_item-assign_sequence_to_array.<locals>.assign_item<  sM    ''$(-g%Qll7C<7GUC5rE   c           	      2  < \        V4      ^ 8X  d>   \        V \        P                  \        P                  34      '       d   Q hS! W0V4       R# V^ ,          p\        V \        P                  4      '       dy   \        SV 4      p\        P                  ! SV4      ;_uu_ 4       pV P                  pV! SWP                  34      pS! WxVR,          W6P                  3,           4       RRR4       R# \        V \        P                  4      '       do   \        \        V 4      4       FT  p	W	,          pSP                  W4      pSP                  \        P                  V	4      p
S! WxVR,          W:3,           4       KV  	  R# Q T 4       h  + '       g   i     R# ; i)r   Nr  )r   r   r   r  rf  r  r	   r  r   r  r8   rm  r   r   )r  r  r  r   r   r  r  r  r  rm   r  assignr  r=   r   s   &&&&       rC   r  (assign_sequence_to_array.<locals>.assignB  s3   v;!!%%..%//)JKKKK,ayeU^^,,1'5AL""7D11T++$WsJJ.?@wvbz7jj]3JK 21
 u//3u:&(--c5,,UZZ;wvbz7X3EF	 ' eO1 211s   #AFF	Nrr   rr   )
r   r=   r   r  r   rO  r  r  r  r  s
   ffffff&&@@rC   assign_sequence_to_arrayr  5  s%    6 6 2 5vr"rE   c                     \        W4      w  r4\        V4      '       d   TpM\        V4      pVf   R # \        P                  ! W#R4      # )Nr   )r4   r   rp  r   r   )r  r  r   rp   	seq_dtypes   &&&  rC   np_array_typerr  ^  sA    ,Y?OD5u%=;;uC((rE   c                 N    \        R V4       \        WV4      pV! W4      pR pWE3# )r   c           
      l   VP                   pVP                  pVP                  ^ ,          pV^ ,          p\        WWVV4      p\	        V4      V8X  g   Q h\        WWgV4       \        WWH4      p	\        WV	P                  VV	P                  WFV4       \        WVP                   V	P                  4       4      # r   )r  rp   r  r  r   r  r@  r  r   r   r    r  )
r   r=   rZ   r  rO  rp   r  r  r  rP  s
   &&&&      rC   r  np_array.<locals>.codegeno  s    zz1g'$sK6{d"""Wu6BWu= 388V!$eC	A  #// #1 	1rE   )r]  r  )r  objr   r  rZ   r  s   &&&   rC   np_arrayr  i  s0    7E*

/C
c/C1" <rE   c                     \        R V4       \        V 4      '       g   \        P                  ! R4      h\	        V4      '       g&   \        V4      f   Rp\        P                  ! V4      hRR lpV# )r   z(The argument "object" must be array-likez:The argument "dtype" must be a data-type if it is providedc                     \        W4      # rY  )r  )r  r   s   &&rC   r   impl_np_array.<locals>.impl  s    &&rE   rY  )r]  r   r   r   r   rp  )r  r   r   r   s   &&  rC   impl_np_arrayr    sd    7E*F##   "1 2 	2u."7"?J  %%'KrE   c                    VP                  ^ 4      pVP                  V4      pVP                  RWE4      pVP                  WqP                  WF4      V4      pVP	                  VP                  RWE4      VP                  RWF4      4      pVP                  VRR7      ;_uu_ 4        RV,          p	V P                  P                  V\        V	34       RRR4       V#   + '       g   i     T# ; i)r   r&  r  Frs  z%s(): axis out of boundsN)	r9   r'  r  r  r)  r)  ru  rv  r  )
r   r=   r   rp   r   r  ll_ndimis_neg_axisaxis_out_of_boundsr   s
   &&&&&     rC   _normalize_axisr    s    99Q<DiioG %%c46K>>+{{4'A4HD !C,D$02 
+E	:	:(94))':vF 
; K	 
;	: Ks   #,CC*	c           
        \        V4      V^,
          8X  g   Q h\        P                  ! \        P                  V4      p\        P
                  ! W4      p\        P                  ! ^4      p\        V^,
          4       F}  p\        P                  ! V4      p	VP                  RW4      p
W(,          pVP                  V
VP                  W4      V	4      pVP                  V\        P                  ! W^ V4      4       K  	  VP                  V\        P                  ! W^ V4      4       \        P                  ! WP                  V4      4      # )z
Compute shape with the new axis inserted
e.g. given original shape (2, 3, 4) and axis=2,
the returned new shape is (2, 3, 1, 4).
r  r   r   r<  r	   r   rV   r8   r'  r  r  r-  rh   r   r>   )r   r=   
orig_shaperp   r   ll_shtyr  rB  r  ll_dim
after_axisrJ  r   s   &&&&&        rC   _insert_axis_in_shaper    s     z?dQh&&&ll7>>40G  2F
..
C TAX$((v<
_nnZ$[[5#% 	b'..w3GH  MM#w++GQEFf)=>>rE   c           
        \        V4      V^,
          8X  g   Q h\        P                  ! \        P                  V4      p\        P
                  ! W4      p\        P                  ! ^4      p\        P                  ! ^ 4      p\        V^,
          4       F{  p	\        P                  ! V	4      p
VP                  RW4      pVP                  VVP                  W4      V
4      pVP                  W),          \        P                  ! W^ V4      4       K}  	  VP                  V\        P                  ! W^ V4      4       \        P                  ! WP                  V4      4      # )z<
Same as _insert_axis_in_shape(), but with a strides array.
r  r  )r   r=   orig_stridesrp   r   r  r   rB  r  r  r  r  r   s   &&&&&        rC   _insert_axis_in_stridesr    s    |q(((ll7>>40G!!'3G
..
C>>!D TAX$((v<
nnZ$[[5#% 	l'**7QD	F  MM$,,Wq$GHg)>??rE   c           
        VP                   pVP                  pVP                  ^ ,          p\        V4      ! WV^ ,          R7      p\        V4      ! W4      p	\        P
                  ! WP                  4      p
\        P
                  ! WP                  4      p\        WWV4      p\        WWV4      p\        V	VP                  VVVP                  VP                  VP                  R7       V	P                  4       # )z'
np.expand_dims() with the given axis.
r$  rN  )r  rp   r  r~   r	   r   re   r   r  r  r   r   r   r   r   r  )r   r=   rZ   r  r   r  rp   rO  rP  r  r  r   
new_shapesnew_stridess   &&&&&         rC   expand_dimsr    s     OOE::DHHQKE
U
GDG
<C
U
G
-C!!'995F""7KK8G&wtLJ)'G4PK3#&LL;;**& ==?rE   c                     VP                   ^8:  d   VP                  MRpVP                  VP                   ^,           VR7      pV! W4      pR pWV3# )r  r  r  c                     V P                  W^,          VP                  ^,          \        P                  4      p\	        WRVP
                  P                  V4      p\        WW#V4      p\        WVP
                  V4      # )r  znp.expand_dims)	r   r  r   r   r  r  rp   r  r   )r   r=   rZ   r  r   r  s   &&&&  rC   r  np_expand_dims.<locals>.codegen  se    ||G!Wchhqk5::Fw1A"33T; 'Ct< 3??CHHrE   )rp   rB  r  )r  rK  r   rB  r  rZ   r  s   &&&    rC   np_expand_dimsr    sJ    1QXX#F
&&affqj&
0C
a,CI <rE   c                     \        V \        P                  4      '       g   R V  2p\        P                  ! V4      h\        V\        P
                  4      '       g   RV 2p\        P                  ! V4      hR pV# )z)First argument "a" must be an array. Got z(Argument "axis" must be an integer. Got c                     \        W4      # rY  )r  )rK  r   s   &&rC   r   !impl_np_expand_dims.<locals>.impl  s    a&&rE   )r   r   r   r   r   r   )rK  r   r   r   s   &&  rC   impl_np_expand_dimsr    sh    a%%9!=  %%dEMM**8?  %%'KrE   c                 4   a aa \         VV 3R  l4       oV3R l# )c           	      B  <aa VoV Uu. uF(  q"P                  \        VP                  S4      R 7      NK*  	  upoVVVV3R lp\        \	        S4      ^8  d   \
        P                  ! S4      MS^ ,          \
        P                  P                  V4      4      V3# u upi )rp   c                 T  < \        SS4      p\        P                  ! W^ ,          4      p\        VSS4       UUUu. uF  w  rgpV! WWgV4      NK  	  p	ppp\	        V	4      ^8  d   V P                  WP                  V	4      p
M	V	^ ,          p
\        WVP                  V
4      # u upppi r   )_atleast_nd_transformr	   r   r   r   r	  r  r   )r   r=   rZ   r  	transformarrsrP  rO  r  retsr  r  rU  minimumr  s   &&&&       rC   r  *_atleast_nd.<locals>.impl.<locals>.codegen!  s    -gt<I''a9D .1vv-FH-F)E gEB-F  H 4y1}((//4H1g$WsLLHs   B#)	r  r  rp   r#   r   r   r  StarArgTuple
from_types)typingcontextr  r  r  r  r  rU  r  s   &*  @@rC   r   _atleast_nd.<locals>.impl  s    CGH4C((CHHg 6(74H	M 	M FaV,VAY++66t<>?FG 	G Is   .Bc                     < S! V !  # rY  rr   )r  r   s   *rC   r  _atleast_nd.<locals>.<lambda>1  s	    trE   r  )r  rU  r   s   ff@rC   _atleast_ndr    s    G G( %$rE   c                <   a a S \        S4      8X  g   Q hVV 3R lpV# )zT
Return a callback successively inserting 1-sized dimensions at the
following axes.
c           	      .  < \        S
4       F  pV^,           pVP                  V8  g   K  \        P                  ! S	V,          4      pVP	                  VP                  ^,           R7      p\        W\        P                  ! W4      V3V4      pTpK  	  V# )r  r  )r8   rp   r	   r   r  r  r   r#   )r   r=   rP  rO  r  rm   rp   r   newarrtyrU  min_ndims   &&&&&    rC   r  (_atleast_nd_transform.<locals>.transform;  s    xAq5DzzD ~~d1g. ::5::>::!'"("2"28"CcV"&( ! ! 
rE   )r   )r  rU  r  s   ff rC   r  r  4  s$    
 s4y    rE   c                      \         ;QJ d    R  V  4       F  '       d   K   RM	  RM! R  V  4       4      '       d   \        ^^ .4      # R# )c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  rZ  rk  s   & rC   r]   np_atleast_1d.<locals>.<genexpr>M       
84C:c5;;''4r_  FTNr  r  r  s   *rC   np_atleast_1dr  K  s7    
s
84
8sss
84
8881qc"" 9rE   c                      \         ;QJ d    R  V  4       F  '       d   K   RM	  RM! R  V  4       4      '       d   \        ^^ ^ .4      # R# )c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  rZ  rk  s   & rC   r]   np_atleast_2d.<locals>.<genexpr>S  r  r_  FTNr  r  s   *rC   np_atleast_2dr  Q  s9    
s
84
8sss
84
8881q!f%% 9rE   c                      \         ;QJ d    R  V  4       F  '       d   K   RM	  RM! R  V  4       4      '       d   \        ^. RO4      # R# )c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  rZ  rk  s   & rC   r]   np_atleast_3d.<locals>.<genexpr>Y  r  r_  FTN)r   r   rq  r  r  s   *rC   np_atleast_3dr  W  s5    
s
84
8sss
84
8881i(( 9rE   c	                   \        V4      \        V4      u;8X  d#   \        V4      u;8X  d   \        V4      8X  g   Q h Q h\        P                  ! ^ 4      p	\        WWx4      p
\        P                  ! WP
                  4      p. pV F  pT	p\        \        W4      4       F`  w  pw  ppVP                  RVP                  V4      V4      pVP                  VV4      pVP                  VVP                  VV4      V4      pKb  	  VP                  V4       K  	  V
P                  p\        W4VWl4       F  w  pppppVP                  p\        P                  ! W\        P                  VP                   R7      pV;_uu_ 4       p\        P"                  ! WVVVVP                   V4      p\%        WVV4      pV P'                  VVVP(                  VP(                  4      p\        P"                  ! WVWVP                   V4      p\+        WVVV4       RRR4       \        P,                  ! VVV4      pK  	  V
#   + '       g   i     L.; i)z*
Concatenate arrays along the given axis.
r'  )orderN)r   r	   r   r@  r   r   r   r   r'  r9   r   r  r  ri   r   r~  rB  rA  r   r   r   r   r  )r   r=   r   r  r  
arr_shapesarr_stridesr  
ret_shapesr  r  ret_stridescopy_offsetsarr_shr  r  r   r-  is_axisaddendret_datarO  rP  arr_starr_datar~  r   rh  r   r  s   &&&&&&&&&                     rC   _do_concatenater  ]  s    v;#d)Js:J#k:JJJJJJ>>!D 5
=C&&w<K L#,S-E#FC$))$		#EG[[v.F^^G$+KK$?$*,F $G 	F#  xxH.1&
2=/M*sFFF88 %%gw~~,1LL:	 Y'//(0605gGG GeW=C,,wU[[%++FC0081;16wHH wX>  &&w&A+/M. J Ys   BH55Ic                 *   VP                   p\        W#4       UUu. uF  w  rx\        V4      ! WVR 7      NK  	  ppp\        WRWe4      pV U	u. uF#  p	\        P
                  ! WP                  4      NK%  	  p
p	V U	u. uF#  p	\        P
                  ! WP                  4      NK%  	  pp	V
^ ,           Uu. uF  p\        P                  ! W4      NK  	  pp\        V4       EF{  pVP                  RVP                  V4      V4      pW,          pVP                  V4      pV
R,           Uu. uF  qV,          NK  	  ppVP                  V4      ;_uu_ 4       w  ppV;_uu_ 4        \        P                  ! VP                   VV.,           4      pVP#                  VV4       RRR4       T;_uu_ 4        \        P$                  pV F&  pVP'                  VVP                  RVV4      4      pK(  	  VP)                  VP+                  V4      RR7      ;_uu_ 4        V P,                  P/                  V\0        RV,          34       RRR4       RRR4       RRR4       EK~  	  V Uu. uF  qP                  V4      NK  	  pp\3        WVW#WWM4	      p\5        WVVP7                  4       4      # u uppi u up	i u up	i u upi u upi   + '       g   i     EL,; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     EK/  ; iu upi )r$  np.concatenater'  r  NFrs  z<np.concatenate(): input sizes over dimension %d do not match)rp   r   r~   r  r	   r   re   r   r  r8   r'  r9   r>   rf  r  r  r  r-  r  r\  r)  r  ru  rv  r   r  r    r  )r   r=   r  r  r  r   rp   r*  rK  rP  r  r  rJ  r  r  r  ret_shape_ptrret_shother_shapeson_axison_other_dimis_okr  s   &&&&&&                 rC   _np_concatenater#    s   ::D f+-+ sOGA6+ 	 - 7-=tJD GKKds'&&w		:dJKIMN#7''=KN 'qM+)b ++G8)  + T{%%dDIIcNDA"m,*4R.9.B3.9__W%%)@'<%%KK F8+- b-0	  ((&B#LL)0)<)<T2v)NPE ' __W\\%%8_GG%%5557:; => H  &% 0 .88Zr,,r"ZJ8
'D 
-C GeS]]_EEY- LN
+ :  HG  &%%$ 9sx   J')J-<)J22J7(J<K;"<KK;0A'K(*KK(	K;"LK	K;K% K((K83K;;Lc                 
   VP                   p\        P                  ! ^ 4      p\        P                  ! ^4      p\        P                  ! \        V4      4      p	\	        W#4       U
Uu. uF  w  r\        V
4      ! WVR7      NK  	  pp
p\        WRWe4      p\        P                  ! W^ ,          P                  4      pVR,           F  p\        P                  p\	        \        P                  ! WP                  4      V4       F|  w  ppVP                  WP                  RVV4      4      pVP                  VP                  V4      RR7      ;_uu_ 4        V P                  P                  V\         R	4       RRR4       K~  	  K  	  V Uu. uF#  p\        P                  ! WP"                  4      NK%  	  pp\$        P&                  ! \        P                  V4      p\        P(                  ! VV4      p\        P(                  ! VV4      p\+        V^,
          4       F  p\        P                  ! V4      pVP                  RVV4      pVV,          pVP-                  VVP/                  VV4      V4      pVP1                  V\        P2                  ! VV^ V4      4       VP1                  V\        P2                  ! VV^ V4      4       K  	  VP1                  V\        P2                  ! VV^ V4      4       VP1                  V	\        P2                  ! VV^ V4      4       \        P                  ! WP5                  V4      4      pV.\        V4      ,          p\        P                  ! WP5                  V4      4      p\+        \        V4      4       Uu. uF  p\        P(                  ! VV4      NK  	  pp\+        V^,
          4       F  p\        P                  ! V4      pVP                  RVV4      pVP-                  VVP/                  VV4      V4      p\+        \        V4      4       FA  pVP1                  VV,          V,          \        P2                  ! VVV,          ^ V4      4       KC  	  K  	  \+        \        V4      4       F3  pVP1                  V\        P2                  ! VVV,          ^ V4      4       K5  	  V Uu. uF(  p\        P                  ! WP5                  V4      4      NK*  	  pp\7        WVW#VVVV4	      p\9        WVVP;                  4       4      # u upp
i   + '       g   i     EK.  ; iu upi u upi u upi )
r   r$  np.stackr  r'  Frs  Nr  )z5np.stack(): all input arrays must have the same shape)rp   r	   r   r   r   r~   r  r   re   r  r\  r'  r)  r  ru  rv  r   r   r   r<  rV   r8   r  r  r-  rh   r>   r  r    r  )r   r=   r  r  r  r   rp   r  rB  
ll_narraysr*  rK  r  rP  r"  rJ  orig_shr  r  input_shapesr  r  r  r  r   rm   input_stridesrK  r  s   &&&&&&                       rC   	_np_stackr*    se   ::D>>!D
..
CD	*J f+-+ sOGA6+ 	 - 7ZDD %%gAw}}=JBxx  w33GYYG)+KBLL(;(;D"g(NOEe!4UCC!!11ZNP DC+  KOO$3G((++>$LO
 ll7>>40G&&w8L$$Wg6J TAX$((vt<
_nnZ$[[5#% 	b'..waMNb'..w
AsKL  MM#w++G\1dKLMM*g2273=34379 :
 ''l1KLL >CI-L%%g||J/GHJ $CI.0. ((':.  0 TAX$((vt<
nnZ$[[5#% s4y!AMM,q/#.!..wa8H!/245 "  3t9dG00-:JA157 	8 
  -., ))'<<3CD,  . 'D m-C GeS]]_EE_- DCC
 PB0*.s$   &T"T		)T2 T7;.T<T/c                     Ve#   \        V\        P                  4      '       g   R # \        V RV4      w  r4V^ 8X  d   Rp\        P
                  ! V4      h\        V4      p\        P                  ! W4V4      # )Nr  z.zero-dimensional arrays cannot be concatenated)r   r   r   r5   r   r  r6   r   )r  r  r   r   rp   r   rB  s   &&&    rC   np_concatenate_typerr,  %  sk    
4 ? ? 	 &i&6@KEqy>##C(()&1F;;uF++rE   c                 z    \        WV4      p\        V\        P                  4      '       g   Q hV! W4      pR  pWE3# )c           
         V P                  W^,          VP                  ^,          \        P                  4      p\	        W\        VP                  ^ ,          4      \        P                  ! W^ ,          4      VP                  V4      # r  )	r   r  r   r   r#  r   r	   r   r  r   r=   rZ   r  r   s   &&&& rC   r  np_concatenate.<locals>.codegen=  s_    ||G!Wchhqk5::Fw#CHHQK0&33G!WE"#	% 	%rE   )r,  r   r   r   )r  r  r   r  rZ   r  s   &&&   rC   np_concatenater1  7  s>    
y$
7Cc5;;''''
f
C% <rE   c                 T    \        V \        P                  4      '       d   RR lpV# R# )r   c                     \        W4      # rY  )r1  r  r   s   &&rC   r   !impl_np_concatenate.<locals>.implK  s    !&//rE   Nr   r   r   rf  r  r   r   s   && rC   impl_np_concatenater8  H  s"    &%//**	0 +rE   c                     V F=  pVP                   ^8  g   VP                   ^8  g   K'  Rp\        P                  ! V4      h	  ^# )r  z7np.column_stack() is only defined on 1-d and 2-d arrays)rp   r   r  )r   r   r  rK  r   s   &&&  rC   _column_stack_dimsr:  P  s<    66A:!KC'',,  rE   c                     \        V R V\        R7      w  r#\        V4      p\        P                  ! W#V4      pV! V4      pR pWg3# )znp.column_stack)dim_chooserc                 T   \        VP                  ^ ,          4      p\        P                  ! W^ ,          4      p. p. pV P	                  \
        P                  ^4      p\        WE4       F  w  rV	P                  ^8X  d%   VP                  V	4       VP                  V
4       K:  V	P                  ^8X  g   Q hV	P                  ^R7      p\        P                  ! W4      p\        WW3V4      pVP                  V4       VP                  V4       K  	  \        WWgVP                  V4      # )r   r  )r   r  r	   r   r   r   r   r   rp   ri   r  r   r#   r  r#  r  )r   r=   rZ   r  orig_arrtys	orig_arrsr  r  r   rO  rP  r3  
expand_signewarrs   &&&&          rC   r   np_column_stack.<locals>.codegenb  s    388A;'((q':	##EJJ2k5JEzzQe$C  zzQ&


*#--e;
$Wz64Pe$F# 6 w"6 	6rE   )r5   r:  r6   r   r   )r  rc  r   rp   rB  r  rZ   r  s   &&      rC   np_column_stackrC  Y  sM    %i&72DFKE *#.F
++e6
*C
c(C64 <rE   c                 P    \        V \        P                  4      '       d   R  pV# R# )c                     \        V 4      # rY  )rC  rc  s   &rC   r   impl_column_stack.<locals>.impl  s    "3''rE   Nr6  rc  r   s   & rC   impl_column_stackrI    s"    #u''	( (rE   c           
         \        W\        VP                  ^ ,          4      \        P                  ! W^ ,          4      VP
                  V4      # )z'
np.stack() with the given axis value.
)r*  r   r  r	   r   r  r/  s   &&&&&rC   _np_stack_commonrK    s?     W#((1+&))'7;__	 rE   c                     \        V R V4      w  r4\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   RMRp\        P                  ! W4^,           V4      pV! W4      pR pWx3# )r%  c              3   >   "   T F  qP                   R 8H  x  K  	  R# 5i)r%  N)rB  r  s   & rC   r]  "np_stack_common.<locals>.<genexpr>  s     8ACs   FTr%  r   c                     V P                  W^,          VP                  ^,          \        P                  4      p\	        WW#V4      # r  )r   r  r   r   rK  r/  s   &&&& rC   r   np_stack_common.<locals>.codegen  s3    ||G!Wchhqk5::F#TBBrE   )r5   r  r   r   )	r  r  r   r   rp   rB  r  rZ   r  s	   &&&      rC   np_stack_commonrQ    sl     &i&0&:KEC88CCC8888ScF
++eAXv
.C
f
CC <rE   c                 T    \        V \        P                  4      '       d   RR lpV# R# )r   c                     \        W4      # rY  )rQ  r4  s   &&rC   r   impl_np_stack.<locals>.impl  s    "600rE   Nr   r6  r7  s   && rC   impl_np_stackrU    s"    &%//**	1 +rE   c                 |    \        WV4      w  rE\        WS4      p\        V4      p\        P                  ! WEV4      pV# rY  )r5   r  r6   r   r   )r  r   r  ndim_minr   rp   rB  r  s   &&&&    rC   NdStack_typerrX    s9    %iFCKEtD)&1F
++e6
*CJrE   c                 :    \        V R V^4      pV! V4      pR pW43# )z	np.hstackc                    a VP                   ^ ,          pV^ ,          P                  pV^ 8X  d.   V P                  \        P                  ^ 4      o\        WW#S4      # V^8X  d   ^ M^oV3R lpV P                  WW#4      # )r   c                 4   < \         P                  ! V SR 7      # r  r  r4  s   &rC   np_hstack_impl3_np_hstack.<locals>.codegen.<locals>.np_hstack_impl  s    ~~f488rE   r  rp   r   r   r   rK  r>  )r   r=   rZ   r  rb  rp   r\  r   s   &&&&   @rC   r  _np_hstack.<locals>.codegen  sr    Qx}}19''

A6D#GcFF
 	1qD9 ++GSOOrE   rX  r  rc  r  rZ   r  s   &&   rC   
_np_hstackrb    s+    
	;Q
7C
c(CP& <rE   c                 P    \        V \        P                  4      '       d   R  pV# R# )c                     \        V 4      # rY  )rb  rF  s   &rC   r   impl_np_hstack.<locals>.impl      c?"rE   Nr6  rH  s   & rC   impl_np_hstackrg    "    #u''	# (rE   c                 :    \        V R V^4      pV! V4      pR pW43# )z	np.vstackc                     VP                   ^ ,          pV^ ,          P                  pV^ 8X  d   R pM7V^8X  d.   V P                  \        P                  ^ 4      p\        WW#V4      # R pV P                  WW#4      # )r   c                 X    \         P                  ! \         P                  ! V 4      ^4      # r  )r  r  hstackr  s   &rC   np_vstack_impl3_np_vstack.<locals>.codegen.<locals>.np_vstack_impl  s    ~~bii&7;;rE   c                 2    \         P                  ! V ^ R7      # )r   r  r  rm  s   &rC   rn  ro        ~~f155rE   r^  )r   r=   rZ   r  rb  rp   rn  r   s   &&&&    rC   r  _np_vstack.<locals>.codegen  sp    Qx}}19< QY''

A6D#GcFF6 ''KKrE   r`  ra  s   &&   rC   
_np_vstackrs    s+    
	;Q
7C
c(CL& <rE   c                 P    \        V \        P                  4      '       d   R  pV# R# )c                     \        V 4      # rY  )rs  rF  s   &rC   r   impl_np_vstack.<locals>.impl  rf  rE   Nr6  rH  s   & rC   impl_np_vstackrw    rh  rE   c                 :    \        V R V^4      pV! V4      pR pW43# )z	np.dstackc                    VP                   ^ ,          pVP                  pV^ ,          P                  pV^ 8X  d   R pV P                  WW#4      # V^8X  d   V P	                  \
        P                  ^4      pVP                  VP                  ^,
          R7      p	\        P                  ! V	.VP                   O5!  p
\        WWV4      pV P	                  \
        P                  ^ 4      p\        P                  ! WY4      p\        WW3V4      # V^8X  d.   V P	                  \
        P                  ^4      p\        WW#V4      # R pV P                  WW#4      # )r   c                 P    \         P                  ! V 4      P                  ^^R4      # )r  r\  )r  rl  r  rm  s   &rC   rn  3_np_dstack.<locals>.codegen.<locals>.np_vstack_impl  s     yy(00Ar::rE   r  c                 2    \         P                  ! V ^R7      # )rq  r  r  rm  s   &rC   rn  r{    rq  rE   )r  r  rp   r>  r   r   r   r  r   r#   rK  r  )r   r=   rZ   r  rb  r  rp   rn  r   stack_retty	stack_sig	stack_retr@  s   &&&&         rC   r  _np_dstack.<locals>.codegen  s$   Qx}}19; ++GSOOQY''

A6D**%**q.*9K((@sxx@I(9)-/I ''

A6D))%=Jw\4PPQY''

A6D#GcFF6 ++GSOOrE   r`  ra  s   &&   rC   
_np_dstackr    s,    
	;Q
7C
c(C PD <rE   c                 P    \        V \        P                  4      '       d   R  pV# R# )c                     \        V 4      # rY  )r  rF  s   &rC   r   impl_np_dstack.<locals>.impl*  rf  rE   Nr6  rH  s   & rC   impl_np_dstackr  '  rh  rE   fillc                     R  pV# )c                     WR &   R# )r6  Nrr   )rP  r   s   &&rC   	fill_implarr_fill.<locals>.fill_impl2  s    ArE   rr   )rP  r   r  s   && rC   arr_fillr  /  s     rE   dotc                     R  pV# )c                 .    \         P                  ! W4      # rY  )r  r  )rP  others   &&rC   dot_implarray_dot.<locals>.dot_impl;  s    vvc!!rE   rr   )rP  r  r  s   && rC   	array_dotr  9  s    " OrE   c                 h    \        V 4      '       g   \        P                  ! R V ,          4      hR pV# )zCannot np.fliplr on %s typec                     \         P                  ! V 4      pVP                  ^8  d   \        R4      hVRRRR1R3,          # )rq  r  r6  N.r\  r  r  rp   r   r  r  s   & rC   r   np_flip_lr.<locals>.implG  s=    JJqM 66A:455TrT3rE   rA  r  r   s   & rC   
np_flip_lrr  A  s2     A  !>!BCC  KrE   c                 h    \        V 4      '       g   \        P                  ! R V ,          4      hR pV# )zCannot np.flipud on %s typec                     \         P                  ! V 4      pVP                  ^8  d   \        R4      hVRRR1R3,          # )r  zInput must be >= 1-d.N.r\  r  r  s   & rC   r   np_flip_ud.<locals>.implX  s:    JJqM 66A:4552s|rE   rA  r  s   & rC   
np_flip_udr  R  s2     A  !>!BCC KrE   c                  aa \        V\        P                  4      '       g   \        P                  ! V4      h\        VP                  4      o\        P                  ! \        P                  SR7      oS! V4      pVV3R lpW#3# )zTCreates a tuple of slices for np.flip indexing like
`(slice(None, None, -1),) * sz` r+  c                    < R  p\         P                  S.p\        P                  ! S.VO5!  pV P	                  \         P                  4      pV P                  S4      pV! S4      V.p	V P                  WWi4      p
V
# )c           
      \    Tp\        V 4       F  p\        W#\        R R R4      4      pK  	  V# )Nr\  )r8   r/   rI  )lengthempty_tupler  rm   s   &&  rC   r   6_build_flip_slice_tuple.<locals>.codegen.<locals>.impln  s/    C6]#CE$b,AB #JrE   )r   r   r   r#   r   get_constant_undefr>  )r   r=   r#   r  r   inner_argtypes	inner_sigll_idx_typer  
inner_argsr  r   
tuple_types   &&&&       rC   r  (_build_flip_slice_tuple.<locals>.codegenm  sw    	  **j1$$ZA.A	,,UZZ800<!$'5
&&wiL
rE   )	r   r   r  r   r>  r   r   r  slice3_type)rq  szrZ   r  r   r  s   &&  @@rC   _build_flip_slice_tupler  c  sg     b%..//((,,r De&7&7tDJ
R.C" <rE   c                     \        V \        P                  4      '       g   \        P                  ! R V ,          4      hR pV# )zCannot np.flip on %s typec                 <    \        V P                  4      pW,          # rY  )r  rp   )r  sls   & rC   r   np_flip.<locals>.impl  s    $QVV,urE   )r   r   r   r   r   r  s   & rC   np_flipr    s8     a%%  !<q!@AA KrE   c                    \        V \        P                  \        P                  \        P                  34      '       d   R	R lpV# \        V\        P
                  4      '       d   R	R lpV# \        V\        P                  4      '       d<   \        VP                  P                  \        P
                  4      '       d   R	R lpV# \        V\        P                  4      '       dX   \        ;QJ d&    R VP                   4       F  '       d   K   RM	  RM! R VP                   4       4      '       d   R	R lpV# R# R# )
r   c                 \    \         P                  ! \         P                  ! V 4      VVR 7      # r  )r  array_splitr  r  indices_or_sectionsr   s   &&&rC   r   np_array_split.<locals>.impl  s$    >>

3# rE   c                    \        V P                  V,          V4      w  r4\        P                  ! \        P                  ! V^,           .V,          V.W,
          ^,
          ,          ,           4      4      p\        P
                  ! WVR7      # )r  r  )divmodre   r  cumsumr   r  )r  r  r   r  rp  r   s   &&&   rC   r   r    sj    CIIdO-@AFAiiQ#*01456! G >>#T::rE   c                 .   \        V P                  4      p\        R RV P                  V4      p. p^ pV F1  p\        W2\	        WV4      4      pVP                  W,          4       TpK3  	  VP                  V \        W2\	        XR4      4      ,          4       V# znp.splitr   N)r0   rp   r   r/   rI  ri   r  r  r   	slice_tupr  prevrI  r   s   &&&     rC   r   r    s    .sxx8I!*fchhEDCD*#IU45EF

38$ + JJs=%T:JKLMJrE   c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  r   r   r   )r[  r  s   & rC   r]  !np_array_split.<locals>.<genexpr>  s      P6O
1emm,,6Or_  FTc                 @   \        V P                  4      p\        R RV P                  V4      p. p^ p\        V4       F1  p\	        W2\        WV4      4      pVP                  W,          4       TpK3  	  VP                  V \	        W2\        XR4      4      ,          4       V# r  )r0   rp   r   r   r/   rI  ri   r  s   &&&     rC   r   r    s    .sxx8I!*fchhEDCD%&9:#IU45EF

38$ ; JJs=%T:JKLMJrE   Nr   )r   r   r  ListTyperb  r   IterableTypeiterator_typer*  r  r  r  r  r   r   s   &&& rC   np_array_splitr    s    #

CDD	 %u}}55	;  	&(:(:;;--88MM
 


	  	&44CP6I6O6OPCCCP6I6O6OPPP
	  Q 	5rE   c                     \        V \        P                  \        P                  \        P                  34      '       d   RR lpV# \        V\        P
                  4      '       d   RR lpV# \        WVR7      # )r   c                 Z    \         P                  ! \         P                  ! V 4      WR 7      # r  )r  splitr  r  s   &&&rC   r   np_split.<locals>.impl  s    88BJJsO-@LLrE   c                     \        V P                  V,          V4      w  r4V^ 8w  d   \        R4      h\        P                  ! WVR7      # )r   z0array split does not result in an equal divisionr  )r  re   r   r  r  )r  r  r   rH  rp  s   &&&  rC   r   r    sH    CIIdO-@AFAax F  >>t rE   r  r   )r   r   r  r  rb  r   r  r  s   &&& rC   np_splitr    s^     #

CDD	M %u}}55	  cTBBrE   c                 H   \        V \        P                  4      '       g   R p\        P                  ! V4      h\        V\        P
                  \        P                  \        P                  \        P                  34      '       g   Rp\        P                  ! V4      hR pV# )#The argument "ary" must be an array:The argument "indices_or_sections" must be int or 1d-arrayc                 j    V P                   ^8  d   \        R4      h\        P                  ! W^ R7      # )rq  z3vsplit only works on arrays of 2 or more dimensionsr  rp   r   r  r  r  r  s   &&rC   r   numpy_vsplit.<locals>.impl  s2    88a< ? A Axxq99rE   r   r   r   r   r   r   rb  r  r  r  r   r   s   &&  rC   numpy_vsplitr    |    c5;;''3  %%)EMM5;;,1JJ,H I IK  %%: KrE   c                 H   \        V \        P                  4      '       g   R p\        P                  ! V4      h\        V\        P
                  \        P                  \        P                  \        P                  34      '       g   Rp\        P                  ! V4      hR pV# )r  r  c                     V P                   ^ 8X  d   \        R4      hV P                   ^8  d   \        P                  ! W^R7      # \        P                  ! W^ R7      # )r   z3hsplit only works on arrays of 1 or more dimensionsr  r  r  s   &&rC   r   numpy_hsplit.<locals>.impl  sN    88q= ? A A88a<88C1==xxq99rE   r  r  s   &&  rC   numpy_hsplitr    s|    c5;;''3  %%)EMM5;;,1JJ,H I IK  %%: KrE   c                 H   \        V \        P                  4      '       g   R p\        P                  ! V4      h\        V\        P
                  \        P                  \        P                  \        P                  34      '       g   Rp\        P                  ! V4      hR pV# )r  r  c                 j    V P                   ^8  d   \        R4      h\        P                  ! W^R7      # )   z3dsplit only works on arrays of 3 or more dimensionsr  r  r  s   &&rC   r   numpy_dsplit.<locals>.impl  s0    88a< * + +xxq99rE   r  r  s   &&  rC   numpy_dsplitr    r  rE   c                
    W8  # )z/
Trivial comparison function between two keys.
rr   r'  s   &&rC   
default_ltr  -  s     5LrE   c                "   WP                   V3p \        V,          #   \         dg    T R8X  d'   \        P                  ! TTRR7      pTP
                  pM+T R8X  d%   \        P                  ! TTR7      pTP                  pX\        T&   Tu # i ; i)z.
Get a sort implementation of the given kind.
r*   T)lt
is_argsortis_np_arrayr+   )r  r  )	rs   _sortsKeyErrorr*   make_jit_quicksortrun_quicksortr+   make_jit_mergesortrun_mergesort)r  lt_implr  keyrN  r  s   &&&   rC   get_sort_funcr  4  s       *
,Cc{ ;//% "D %%D[ //%'D %%Dss    A.BBc                     \        V \        P                  4      '       d   \        # \        V \        P                  4      '       d   \
        # \        # rY  )r   r   r  r   rj  r   r  rW  s   &rC   lt_implementationr  L  s6    %%%	E5==	)	)rE   z
array.sortc                    a VP                   ^ ,          p\        R\        VP                  4      R7      oV3R lpV P	                  WW#4      # )r   r*   )r  r  c                    < S! V 4       R # rY  rr   rP  	sort_funcs   &rC   array_sort_impl#array_sort.<locals>.array_sort_impl\  s
    #rE   )r  r  r  r   r>  )r   r=   rZ   r  rY  r  r  s   &&&&  @rC   
array_sortr  U  sC    hhqkG;&7&FHI ##GcHHrE   c                 Z    \        V 4      '       g   \        P                  ! R 4      hR pV# )zArgument "a" must be array-likec                 F    V P                  4       pVP                  4        V# rY  )r  rN  )rK  r  s   & rC   np_sort_impl"impl_np_sort.<locals>.np_sort_impli  s    ffh

rE   rA  )rK  r  s   & rC   impl_np_sortr 	  c  s2    A   "1 2 	2 rE   zarray.argsortc                    a	 VP                   w  rE\        VP                  \        VP                  4      R R7      o	V	3R lpVP                  VP                   R,          R7      pVR,          pV P                  WWx4      # )T)r  r  r  c                    < S! V 4      # rY  rr   r  s   &rC   array_argsort_impl)array_argsort.<locals>.array_argsort_imply  s    ~rE   rM  r  )r  r  r   r  r   replacer>  )
r   r=   rZ   r  rY  r  r	  innersig	innerargsr  s
   &&&&     @rC   array_argsortr	  p  sq     HHMG4#5#5&7&F)-/I {{{-HRI##G$,9 9rE   c                 b    VP                   VP                   8w  g   VP                  R 8X  g   Q hV# )r  )r  rB  )r   r=   r  r  r   s   &&&&&rC   array_to_arrayr
	    s*     >>T\\)T[[C-???JrE   c                 r    R  p\        W24      pV P                  WWd.4      p\        WVP                  V4      # )c                 $    V P                  ^ 4      # r   )r  r  s   &rC   r   array0d_to_scalar.<locals>.impl  s    vvayrE   )r#   r>  r!   r  r   r=   r  r  r   r   rZ   r  s   &&&&&   rC   array0d_to_scalarr	    s:     D
!C

"
"7#u
=CgEErE   c                 r    R  p\        W24      pV P                  WWd.4      p\        WVP                  V4      # )c                 &    \        V R,          4      # r  )r  r  s   &rC   r    array_to_unichrseq.<locals>.impl  s    1R5zrE   )r#   r>  r   r  r	  s   &&&&&   rC   array_to_unichrseqr	    s:     D
!C

"
"7#u
=CWsDDrE   c                    \         h)zJ
An intrinsic returning a derived array with the given shape and strides.
r   )rK  re   r   s   &&&rC   reshape_uncheckedr	    r  rE   c                    a R  oV3R lpV# )c                     \        V \        P                  4      ;'       d5    \        ;QJ d    R  V  4       F  '       d   K   R# 	  R# ! R  V  4       4      # )c              3   V   "   T F  p\        V\        P                  4      x  K!  	  R # 5irY  r  r  s   & rC   r]  >type_reshape_unchecked.<locals>.check_shape.<locals>.<genexpr>  s     @%QJq%--00%r_  FT)r   r   rf  r  re   s   &rC   r  +type_reshape_unchecked.<locals>.check_shape  sP    5%//2 A A@%@	B	B@%@@	BrE   c                    < \        V \        P                  4      '       g   R # S! V4      '       d   S! V4      '       g   R # \        V4      \        V4      8w  d   R # V P	                  \        V4      RR7      # )Nr  r  )r   r   r   r   r  )rK  re   r   r  s   &&&rC   typer%type_reshape_unchecked.<locals>.typer  sY    !U[[))5!!W)=)=u:W%vv3u:cv22rE   rr   )r   r	  r  s   & @rC   type_reshape_uncheckedr	    s    B3 LrE   c           	         VP                   ^ ,          pVP                  p\        V4      ! WV^ ,          4      p\        V4      ! W4      p\        P                  ! W^,          4      p\        P                  ! W^,          4      p	\        VVP                  VV	VP                  VP                  R7       VP                  4       p
\        WWZ4      # )r   r;  )r  r  r~   r	   r   r   r   r   r   r  r   )r   r=   rZ   r  r   r  r  r  re   r   r  s   &&&&       rC   impl_shape_uncheckedr!	    s    HHQKEOOE
U
Gd1g
6C
U
G
-C  q'2E""7G4G3"LL;; --/CWu::rE   c                    aa VR \         P                  39   d   \        R 4       oM\        R 4       oVR \         P                  39   d   \        P                  ! R4      h\        R 4       oRVV3R llpV# )Nc                     V P                   # rY  r	  r  re   s   &&rC   r  as_strided.<locals>.get_shape  s    77NrE   c                     V# rY  rr   r$	  s   &&rC   r  r%	    s    LrE   z,as_strided() strides argument cannot be Nonec                     V# rY  rr   )r  r   s   &&rC   get_stridesas_strided.<locals>.get_strides  s    NrE   c                 :   < \        V S! W4      S! W4      4      p V # rY  )r	  )r  re   r   r  r(	  s   &&&rC   as_strided_impl#as_strided.<locals>.as_strided_impl  s     a1!4k!6MNrE   r  )r   r  r%   r   r   )r  re   r   r+	  r  r(	  s   &&& @@rC   
as_stridedr-	    s    uzz""		 
	 
	 
	 4$$
   !OPP		 
	  rE   c                   aaaa \        V\        P                  4      '       dX   \        \	        V P
                  ^,           4      4      o\        \	        V P
                  ^,           4      4      o\        R 4       oM\        V\        P                  4      '       d   \        VP                  \        P                  4      '       dj   \        \	        V P
                  \        V4      ,           4      4      o\        \	        V P
                  \        V4      ,           4      4      o\        R 4       oM\        P                  ! R4      h\        V4      '       d   \        R 4       oM\        V\        P                  4      '       d   \        R 4       oMm\        V\        P                  4      '       d8   \        VP                  \        P                  4      '       d   \        R 4       oM\        P                  ! R4      hR	VVVV3R llpV# )
r  c                     V 3# rY  rr   window_shapes   &rC   get_window_shape-sliding_window_view.<locals>.get_window_shape   s
     ?"rE   c                     V # rY  rr   r0	  s   &rC   r2	  r3	  	  s    rE   z4window_shape must be an integer or tuple of integersc                 *    \        \        V4      4      # rY  )r   r8   r1	  r   rp   s   &&&rC   get_axis%sliding_window_view.<locals>.get_axis  s    d$$rE   c                     \        R RW!4      .# sliding_window_viewr   r   r6	  s   &&&rC   r7	  r8	    s     4fdI rE   c           	      F    V Uu. uF  p\        R RW#4      NK  	  up# u upi r:	  r<	  )r1	  r   rp   rK  s   &&& rC   r7	  r8	  !  s3     "#! ##8&$J!# # #s   z2axis must be None, an integer or tuple of integersc                   < S! V4      pS
! WV P                   4      p\        V4      \        V4      8w  d   \        R 4      hSpSp\        V P                   4       F=  p\	        W5V P
                  V,          4      p\	        WEV P                  V,          4      pK?  	  V P                   p\        W!4       F  w  rgV^ 8  d   \        R4      hW6,          V8  d   \        R4      hW6,          V,
          ^,           p\	        W6V4      p\	        W5V4      p\	        WEV P                  V,          4      pV^,          pK  	  \        WV4      p	V	# )z2Must provide matching length window_shape and axisz-`window_shape` cannot contain negative valuesz4window_shape cannot be larger than input array shape)	rp   r   r   r8   r/   re   r   r   r	  )r  r1	  r   	out_shapeout_stridesrm   r   r  trimmedr  r7	  r2	  shape_bufferstride_buffers   &&&       rC   sliding_window_view_impl5sliding_window_view.<locals>.sliding_window_view_impl+  s.   '5AFF3|D	)D 
 !	#qvvA%iAGGAJ?I'		!EK  FF4.GBQw C  }s" J   mc)A-G%iW=I%iC8I'		"FKFA /$ !{;rE   rY  )r   r   r   r   r8   rp   r%   r  r   r   r   r   r   )r  r1	  r   rD	  r7	  r2	  rB	  rC	  s   &&& @@@@rC   r;	  r;	    s    ,..U166A:./eAFFQJ/0		# 
	# \5>>
2
2|))5==99U166C,=#=>?eAFFS->$>?@		  
	    B
 	

 4		% 
	% 
D%--	(	(		 
	
 T5>>
*
*tzz5==11		# 
	#
   @
 	
% %N $#rE   c                 P    \        V \        P                  4      '       d   R  pV# R# )c                     V P                   ^ 8X  d   \        R8  d   R# \        R4      hV P                   ^8X  d   \        V P	                  ^ 4      4      # \        R4      h)r   FziThe truth value of an empty array is ambiguous. Use `array.size > 0` to check that an array is not empty.z[The truth value of an array with more than one element is ambiguous. Use a.any() or a.all())rq  rq  )r   r   r   rg  r  r  s   &rC   r   ol_bool.<locals>.implX  s_    xx1} 6) $ 'J L L QCHHQK((  #- / /rE   NrZ  r  s   & rC   ol_boolrI	  U  s$    #u{{##	/  $rE   c                   aa \        V\        \        P                  34      '       g   \        P
                  ! R 4      h\        V\        \        P                  34      '       g   \        P
                  ! R4      h\        V \        P                  4      '       g   \        P
                  ! R4      hV P                  o\        \        S4      4      oVV3R lpV# )z.The second argument "axis1" must be an integerz-The third argument "axis2" must be an integer'The first argument "a" must be an arrayc                    < \        R RSV4      p\        R RSV4      p\        SW4      p\        W2V4      p\        P                  ! W4      # )znp.swapaxesaxis1axis2)r   r/   r  rS  )rK  rM	  rN	  
axes_tuple	axes_listrp   s   &&& rC   r   numpy_swapaxes.<locals>.implx  sJ    }gtUC}gtUC"9e;
":e<
||A**rE   )
r   r   r   r   r   r   r   rp   r   r8   )rK  rM	  rN	  r   rP	  rp   s   &&& @@rC   numpy_swapaxesrR	  i  s    ec5==122   "+ , 	,ec5==122   "+ , 	,a%%  !JKK 66DeDk"I+ KrE   c                   aa \        V \        P                  4      '       g   \        P                  ! R 4      h\        V\        P
                  4      '       ga   \        V\        P                  4      '       d+   \        VP                  \        P
                  4      '       g   \        P                  ! R4      h\        V\        P
                  4      '       ga   \        V\        P                  4      '       d+   \        VP                  \        P
                  4      '       g   \        P                  ! R4      hV P                  oRV P                  ,          oVV3R lpV# )rK	  zGThe second argument "source" must be an integer or sequence of integerszKThe third argument "destination" must be an integer or sequence of integersc                   < \        R RS
V4      p\        R RS
V4      p\        V4      \        V4      8w  d   \        R4      h\        V P                  4       Uu. uF  q3V9  g   K  VNK  	  pp\        \        W!4      4       F  w  rVVP                  WV4       K  	  Sp\        V4       F  w  r\        WxV	4      pK  	  V P                  V4      # u upi )znp.moveaxissourcedestinationzL`source` and `destination` arguments must have the same number of parameters)r   r   r   r8   rp   r  r   r  r   r/   rS  )rK  rU	  rV	  r]  
order_listr  r  r  rm   orp   
order_inits   &&&       rC   r   numpy_moveaxis.<locals>.impl  s    %mXtVL*=$
 v;#k**0 
 "'qvvBA6/aa
BK 89IDd( : j)DA!%A.E * {{5!! Cs   C&Cr  )	r   r   r   r   r   r   r  r   rp   )rK  rU	  rV	  r   rp   rY	  s   &&& @@rC   numpy_moveaxisr[	    s    a%%  !JKK65==))vu~~..6<<77   &
 	

 	;..{ENN33;,,emm<<   &
 	

 66DJ", KrE   c                    \        R RV P                  V4      p\        V P                  4      p^Wb&   \	        \        WaP                  4      4       F;  w  pw  rV^8X  d   T	p
MV	^8X  d   Tp
MW8w  d   \        R4      hTp
\        WWV
4      pK=  	  \        WRV P                  V,          4      p\        P                  ! W4      p \        P                  ! W4      pTp\        V4      ^ 8  d9   \        \        V4      4       F   p\        WV P                  V,          4      pK"  	  Tp\        V4      ^ 8  dG   \        \        V4      4       F.  p\        WV P                  V^,           V,           ,          4      pK0  	  VP                  V,          p\        P                  ! W3,           V,           V P                  4      p\        RRR4      3p\        P                  ! V4       F  p\        P                  ! V4       Fm  pV VV,           V,           ,          pVVV,           V,           ,          pVVV,           V,           ,          p\        V4       F  pVVV,          ,          VV&   K  	  Ko  	  K  	  V# )znp.take_along_axisr   z*`arr` and `indices` dimensions don't matchN)r   rp   r   re   r   r   r   r/   r  r  r   r8   rY  r   rI  r  )rP  r   r   Ni_origNk_origindices_broadcast_shape	arr_shaperm   d1d2new_valarr_broadcast_shapeNiNkJr  np_s_iikka_1d
indices_1dout_1dr  s   &&&&&&                 rC   _take_along_axis_implrn	    s    .$GD SYYIIO Y!>?8B7G1WGx @  G"/##
 @ (syy //#
3Coog?G	B
7|as2wArciil3B  	B
7|as2wArciiq1&=>B   	dA
((29r>399
-C4t$&Ejjn**R.BrEzB'D eb1Jeb)F1X A/q	 	 !  JrE   c                   aaa \        V \        P                  4      '       g   \        P                  ! R 4      h\        V\        P                  4      '       g   \        P                  ! R4      h\        VP
                  \        P                  4      '       g   \        P                  ! R4      h\        V4      '       d   ^pMV P                  pW1P                  8w  d   \        P                  ! R4      h\        \        VP                  4      4      o\        V4      '       d	   V3R lpV# \        VR4       \        V\        P                  4      '       g   \        P                  ! R4      hVP                  pV^ 8  d   V P                  V,           pV^ 8  g   W P                  8  d   \        P                  ! R4      h\        \        V4      4      o\        \        V^,           V P                  4      4      oVVV3R lpV# )	z)The first argument "arr" must be an arrayz.The second argument "indices" must be an arrayz'The indices array must contain integersz;`indices` and `arr` must have the same number of dimensionsc                 @   < \        V P                  4       V^ RRS4      # )r   rr   )rn	  r  )rP  r   r   r_	  s   &&&rC   take_along_axis_impl1arr_take_along_axis.<locals>.take_along_axis_impl
  s%    (B)@B BrE   r   zaxis must be a literal valuezaxis is out of boundsc                 "   < \        WVSSS4      # rY  )rn	  )rP  r   r   re	  rf	  r_	  s   &&&rC   rq	  rr	    s    (tR)@B BrE   )r   r   r   r   r   r   r   r   rp   r   r8   r   r  r  r   )rP  r   r   arr_ndimrq	  re	  rf	  r_	  s   &&&  @@@rC   arr_take_along_axisru	    s   c5;;''  !LMMgu{{++  <> 	>gmmU]]33  !JKK488<<  I
 	
 $E',,$784	B(  ! 	v&$ 4 455(()GHH!!!888d?D!8txx'(()@AA5;5388,-	B  rE   c                    \        V \        P                  4      '       d   \        V \        P                  4      '       d   R	R lpV# \        V \        P                  4      '       d   R	R lpV# \        V \        P
                  4      '       d   R	R lpV# \        P                  ! R4      h\        V 4      '       d   \        V P                  \        P                  4      '       d   R	R lpV# \        V P                  \        P                  4      '       d   R	R lpV# \        V P                  \        P
                  4      '       d   R	R lpV# \        P                  ! R4      h\        P                  ! R4      h)
Tc                     V # rY  rr   r  r  nanposinfneginfs   &&&&&rC   r   nan_to_num_impl.<locals>.impl&      rE   c                 v   Ve   TM(\         P                  ! \        V 4      4      P                  pVe   TM(\         P                  ! \        V 4      4      P                  p\         P
                  ! V 4      '       d   V# \         P                  ! V 4      '       d   V# \         P                  ! V 4      '       d   V# V # rY  )r  finfor9   r  r  rK  isneginfisposinf)r  r  ry	  rz	  r{	  min_infmax_infs   &&&&&  rC   r   r|	  *  s     ) $q'*..  ) $q'*..  88A;;J[[^^"N[[^^"NrE   c                     \         P                  ! V P                  W#VR 7      p\         P                  ! V P                  W#VR 7      p\	        WV4      # ))ry	  rz	  r{	  )r  
nan_to_numrr  rt  complex)r  r  ry	  rz	  r{	  r  r  s   &&&&&  rC   r   r|	  >  s8    MM!&&cPMM!&&cPq}$rE   z4Only Integer, Float, and Complex values are acceptedc                     V # rY  rr   rx	  s   &&&&&rC   r   r|	  J  r}	  rE   c                 r   Ve   TM)\         P                  ! V P                  4      P                  pVe   TM)\         P                  ! V P                  4      P                  p\         P
                  ! V 4      pV'       d   \         P                  ! V4      MTpVP                  p	\        VP                  4       F{  p
\         P                  ! W,          4      '       d   W)V
&   K+  \         P                  ! W,          4      '       d   WYV
&   KS  \         P                  ! W,          4      '       g   Kw  WiV
&   K}  	  V# rY  )r  r	  r   r  r  r  r  r3  r8   r   rK  r	  r	  )r  r  ry	  rz	  r{	  r	  r	  x_outputoutput_flatrm   s   &&&&&      rC   r   r|	  M  s     ) !''*..  ) !''*..  ZZ](,"$kkv{{+Axx//),A[^44)0A[^44)0A , rE   c                    \         P                  ! V 4      pV'       d   \         P                  ! V4      MTp\         P                  ! VP                  R VVVR7       \         P                  ! VP
                  R VVVR7       V# )F)r  ry	  rz	  r{	  )r  r  r  r	  rr  rt  )r  r  ry	  rz	  r{	  r	  r	  s   &&&&&  rC   r   r|	  f  sg    ZZ](,"KK!! KK!! rE   z4The first argument must be a scalar or an array-likeTg        NN)
r   r   r  r   r  rj  r   r   r   r   )r  r  ry	  rz	  r{	  r   s   &&&&& rC   nan_to_num_implr	  !  s5   !U\\""a''t Ko 5;;''l KG 5==))%D K{ $$F  
!		aggu}}--l Ki --f K7 //4 K $$F     ". / 	/rE   rY  rp  rc  r  )rq  r  r"  r   r\  )Fr  r	  (  r  r  r  r  r  llvmliter   llvmlite.irr   numpyr  numbar   r   
numba.corer   r   r   r	   r
   numba.np.numpy_supportr   r   r   r   r   r   r   r   r   r   r   r   r   numba.core.imputilsr   r   r   r   r   r   r   r   r    r!   r"   numba.core.typingr#   numba.core.typesr$   numba.core.extendingr%   r&   r'   r(   r)   
numba.miscr*   r+   numba.cpythonr,   numba.cpython.charseqr-   r.   numba.cpython.unsafe.tupler/   r0   r1   numba.core.typing.npydeclr2   rp  r3   rq  r4   r5   r6   rD   rH   r~   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r!  ArrayIteratorBORROWEDr3  rL  r  rR  r  r   r:  rT  rV  rf  rd  r  Anyrk  r   rp  r   rw  rz  r  r|  r  r  r  r  r  r  ra  rL  rS  rX  rZ  rb  r  r  r  r  r  r  r  r  r  r  r  broadcast_shapesr  r  r  r  r  r  rh  r0  r4  r8  rL  VarArgrO  rS  rY  r2  rv  re  	geomspacer  rot90r  r  r  r  r  r  r  resizer  ri   r  r  r  r  r  r  r  r  r  r#  r=  re   rC  r   rG  uniquerT  re  rc  rX  rj  rr  rt  r  r  r  r  
MemoryViewr  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  DTypeNumberClassr  r  r  r  r   r  r	  r  r  r  r  r  r   Bytesr$  is_r,  r1  r7  r;  rG  rI  r  r  r5  r  r  r  r  r
  r  r9  r  r  r  r  r  r  r  r  rN  r  NumpyNdIterTyper  eqr"  r@  r>  r*  r;  rS  rW  r  r]  rh  rY  rl  rs  rx  r  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  eyer  diagr  r   r  diagflatr  r  r  r  r  r  r  r_  r  r"  r$  r&  r  r,  r:  r?  rB  rH  rK  rN  rQ  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  
atleast_1dr  
atleast_2dr  
atleast_3dr  r  r#  r*  r,  r1  r  r8  r:  rC  column_stackrI  rK  rQ  stackrU  rX  rb  rl  rg  rs  vstackrw  	row_stackr  dstackr  r  r  r  r  r  r  r  flipr  r  r  r  r  vsplitr  hsplitr  dsplitr  r  r  r  r  r  rN  r 	  argsortr	  r
	  UnicodeCharSeqr  rj  r  NPTimedelta
NPDatetimer	  r	  r	  type_callabler	  r!	  libstride_tricksr-	  r;	  rg  rI	  r  rR	  moveaxisr[	  rn	  take_along_axisru	  r	  r	  rr   rE   rC   <module>r	     sU  
         * @ @; ; ; P O* * * * ( *A A + ! B L 5E E#69x(-M	

 BJH& 
 
. , 
 

,  ,^ y%,,' (.;* z5../w - ! 0-4A4H ;* xu}}=xu?xu~~>E ? @ >E" xu?E @E0 xuyy%))D%6 E%6P sELL!F "F |U[[)8 *8 6?EKK;) <)(/"f /"d/-G /-dW >:-' :-zN-' N-bB-7 B-JL6 L^(GV xu{{;; <;&'TH
:$z"J!. 4  ,  " 5 5>- 
"//'& '&T 3 3  
"

% %P 
"

6 6r 

"95
 6
 

"51 2*U%v&  %++.; /;
  %++u?3E @3El  %++u||EII/FGF HF
 
",,  u{{C 9 !9& 
"++  
",,I IX 
"(( 4!H;< U__==E >=E@ U\\%))-DE> F>
 6bjj 
 bjj  
"))+ +\ 
")) 2 }ekk* +, rxx%G &G , - 
 
   
"''v vr f% &{| 
"((  
"''  
"))  
")))1 )1X  " 5;;1 2  	 

9-( .(V |U[[%//:$E ;$ET u{{G$: %:
 u{{G$u): * %: u{{I&u+: , ': u{{F#u(: ) $:
 u{{F#: $: u{{J'u,: - (: u{{H%u*: + &: u.: /:
 u0: 1:
 u0: 1:
 u,: -: u{{H%	9 &	9 u  &): *: Eu~~.Eu}}-; . /;4 u{{G$8 %8 u.u0	: 1 /	: u0
: 1
:  u{{F#Q $Q u{{F#Q $Q 4Mn f%k* + &%
 ekk6 ": . ekk6 ": . !2!2EII>( ?(. u{{#4; $4;n e.A.ABO CO u||$$= %$=N u||$D %D: u/B/BCA DA u/C/CDE EE u/B/BEIIN	% O	% u/C/CUYYO
% P
%" ; ; 3 3 9 9 x||U[[%++6
G 7
G  EKK, -9>#BOEP
>BVr u{{F#P $P z5../w E ! 0E x!4!4emmDE EE x!4!4emmyy%% sE''( ) r~~u{{+E ,E" z5556w C ! 7C xemm45rzz5<<67
E 8 6
E x)rzz5??+E , *E* z5112w 7 ! 37 ryy%))$> %>& z5001w 7 ! 27 x{{EKK5F 6FL^ ekk;u= >* 
 
-`K#&   
"((" & &*   
"-- 0   l+ , 
"(("   
"--  
",,
 
 
"''   
",,
 
 
"''  
"++ 	 %& ' BFF1E  2 
"''# #L 
"** 6 
"++ 4  F 
"''f%^ & ^B4 
"))@ @F 
"++$ $N"PJ   |U[[)4 *4 
"'' ><B ? ? 
"


  
 
"

  ~u{{EOO<~u{{E,?,?@P A =P: ' 'T i( ) T Tn 
"--%*"Q  8 
&  
& !H1Dh"<&'R&#R)  2 
"(( &?:@:8    
".. %2. 
"--# #
 
"--& &
 
"--) )
:z/FdVFr,$    
"..  " "J 
"//    
"((   4 
"))   4 
"))  FR\\>* & &R 
"))  5;;/ 0 5;;. / 
"))   
"))    : 
"''
 
 
"..; ;| 
"((C C4 
")) & 
")) * 
")) , 
0 |U[[)
I *
I 
"''	 	 U-@-@Arzz5;;(;(;<9 = B9& EKK% & EKK--.EKK%EKK'EKK'EKK'EKK**+EKK))*F + , ( ( ( & /F EKK--.E /E *+ ,"  %++uP; Q;* BFF((334 58 BFF((<<=[$ >[$| 
$ & 
"++ 0 
"++3 3l 8 8v 
"

(  ( V 
"--^ ^rE   