@unbox(types.Array)
def unbox_array(typ, obj, c):
 nativearycls = c.context.make_array(typ)
 nativeary = nativearycls(c.context, c.builder)
 aryptr = nativeary._getpointer()
 ptr = c.builder.bitcast(aryptr, c.pyapi.voidptr)
 if c.context.enable_nrt:
  errcode = c.pyapi.nrt_adapt_ndarray_from_python(obj, ptr)
 else:
  errcode = c.pyapi.numba_array_adaptor(obj, ptr)
 failed = cgutils.is_not_null(c.builder, errcode)
 return NativeValue(c.builder.load(aryptr), is_error=failed)

@ unbox ( types . Array ) def unbox_array ( typ , obj , c ) : nativearycls = c . context . make_array ( typ ) nativeary = nativearycls ( c . context , c . builder ) aryptr = nativeary . _getpointer ( ) ptr = c . builder . bitcast ( aryptr , c . pyapi . voidptr ) if c . context . enable_nrt : errcode = c . pyapi . nrt_adapt_ndarray_from_python ( obj , ptr ) else : errcode = c . pyapi . numba_array_adaptor ( obj , ptr ) failed = cgutils . is_not_null ( c . builder , errcode ) return NativeValue ( c . builder . load ( aryptr ) , is_error = failed )
convert a numpy array object to a native array structure .