HeeHo Park <[email protected]> writes:

> Yes, this works.
>
> u = da.getVecArray(U)
> for i in range(mstart, mend):
>         u[i] = np.sin(np.pi*i*6.*h) + 3.*np.sin(np.pi*i*2.*h)
>
> The code above also worked without restoreVecArray. I guess the u just
> points at the array U.

It won't be restored until u goes out of scope, and even that would
depend on the Python implementation.  Use the "with" context manager.

Reply via email to