def _getitem_array_generic(context, builder, return_type, aryty, ary, index_types, indices):
 (dataptr, view_shapes, view_strides) = basic_indexing(context, builder, aryty, ary, index_types, indices)
 if isinstance(return_type, types.Buffer):
  retary = make_view(context, builder, aryty, ary, return_type, dataptr, view_shapes, view_strides)
  return retary._getvalue()
 else:
  assert (not view_shapes)
  return load_item(context, builder, aryty, dataptr)

def _getitem_array_generic ( context , builder , return_type , aryty , ary , index_types , indices ) : ( dataptr , view_shapes , view_strides ) = basic_indexing ( context , builder , aryty , ary , index_types , indices ) if isinstance ( return_type , types . Buffer ) : retary = make_view ( context , builder , aryty , ary , return_type , dataptr , view_shapes , view_strides ) return retary . _getvalue ( ) else : assert ( not view_shapes ) return load_item ( context , builder , aryty , dataptr )
return the result of indexing *ary* with the given *indices* .