I wanna calculate the correlation of a matrix but I got a lot of NaN. I guess the problem is that some of the elements are NaN. Because the matrix is very big, I can't print it out to check. How can I know if there are NaNs in the matrix? And if there are, how can I change them to 0?