Fix bug with memory handling in numpy_bind.hh