Checking if wave contains any nan value

Hello all,

The function 

numtype(num)

allows to check if the specific number `num` is a nan. 


I am facing a use case where I need to make sure that the wave I am processing does not contain any `nan` value. A basic way is to check every value using a  for-loop for this. However, my wave is large (over 10,000 points).

Is there a faster way to do this ? 
Thank you. 

You did not indicate whether the wave is 1D or 2D. Also, if you want to use the remaining data,the following may be of use:with MatrixOP:

zapNaNs(w)  Returns a one-column wave containing the sequential data of w with all NaN elements removed. 
The input w can be 1D or 2D but higher dimensions are not supported.
    Added in Igor Pro 9.00.

 

If you are going to use WaveStats I recommend using: 

WaveStats/M=1 myWave.

 The flag tells Igor to skip the computation of the second and higher statistical moments.

Another efficient way to get the answer is:

print numtype(sum(myWave))