def host_pointer(obj):
 if isinstance(obj, (int, long)):
  return obj
 forcewritable = isinstance(obj, np.void)
 return mviewbuf.memoryview_get_buffer(obj, forcewritable)

def host_pointer ( obj ) : if isinstance ( obj , ( int , long ) ) : return obj forcewritable = isinstance ( obj , np . void ) return mviewbuf . memoryview_get_buffer ( obj , forcewritable )
note: the underlying data pointer from the host data buffer is used and it should not be changed until the operation which can be asynchronous completes .