Python Replace Nan In Numpy Array Dimensions