Safer way to expose a C-allocated memory buffer using numpy/ctypes? Safer way to expose a C-allocated memory buffer using numpy/ctypes? numpy numpy