@lower_builtin('getitem', types.Buffer, types.Integer)
@lower_builtin('getitem', types.Buffer, types.SliceType)
def getitem_arraynd_intp(context, builder, sig, args):
 (aryty, idxty) = sig.args
 (ary, idx) = args
 assert (aryty.ndim >= 1)
 ary = make_array(aryty)(context, builder, ary)
 res = _getitem_array_generic(context, builder, sig.return_type, aryty, ary, (idxty,), (idx,))
 return impl_ret_borrowed(context, builder, sig.return_type, res)

@ lower_builtin ( 'getitem' , types . Buffer , types . Integer ) @ lower_builtin ( 'getitem' , types . Buffer , types . SliceType ) def getitem_arraynd_intp ( context , builder , sig , args ) : ( aryty , idxty ) = sig . args ( ary , idx ) = args assert ( aryty . ndim >= 1 ) ary = make_array ( aryty ) ( context , builder , ary ) res = _getitem_array_generic ( context , builder , sig . return_type , aryty , ary , ( idxty , ) , ( idx , ) ) return impl_ret_borrowed ( context , builder , sig . return_type , res )
basic indexing with an integer or a slice .