As I told you on the IRC, this [:,:] = 0 is bad as `tempU` and `u` alias to each other. Your original `zeros_like` call was correct...

Sorry about this ;-)