@lower_builtin('getitem', types.Buffer, types.BaseTuple)
def getitem_array_tuple(context, builder, sig, args):
 (aryty, tupty) = sig.args
 (ary, tup) = args
 ary = make_array(aryty)(context, builder, ary)
 index_types = tupty.types
 indices = cgutils.unpack_tuple(builder, tup, count=len(tupty))
 (index_types, indices) = normalize_indices(context, builder, index_types, indices)
 if any((isinstance(ty, types.Array) for ty in index_types)):
  return fancy_getitem(context, builder, sig, args, aryty, ary, index_types, indices)
 res = _getitem_array_generic(context, builder, sig.return_type, aryty, ary, index_types, indices)
 return impl_ret_borrowed(context, builder, sig.return_type, res)

@ lower_builtin ( 'getitem' , types . Buffer , types . BaseTuple ) def getitem_array_tuple ( context , builder , sig , args ) : ( aryty , tupty ) = sig . args ( ary , tup ) = args ary = make_array ( aryty ) ( context , builder , ary ) index_types = tupty . types indices = cgutils . unpack_tuple ( builder , tup , count = len ( tupty ) ) ( index_types , indices ) = normalize_indices ( context , builder , index_types , indices ) if any ( ( isinstance ( ty , types . Array ) for ty in index_types ) ) : return fancy_getitem ( context , builder , sig , args , aryty , ary , index_types , indices ) res = _getitem_array_generic ( context , builder , sig . return_type , aryty , ary , index_types , indices ) return impl_ret_borrowed ( context , builder , sig . return_type , res )
basic or advanced indexing with a tuple .