python script to check for nans in a run