Add NaN-guard to gradient updates
Explixitly seed numpy