I would use reshape(du, :) instead of du[:]. The latter might create a completely new copy of du so the results do not end up in the correct memory.
I would use reshape(du, :) instead of du[:]. The latter might create a completely new copy of du so the results do not end up in the correct memory.