remove Nan values from array `x`,x = x[numpy.logical_not(numpy.isnan(x))]