I'd like to compare a signal with the help of np.all() with a reference signal. The reference can contain np.nan. At this NaN-position it does not matter if the signal fulfills the comparison condition. Following is a sample code. But this code does not work. I could compare each element within a for-loop but is there a smart way to do this comparison?
import numpy as np reference = np.array([np.nan, 1]) signal = np.array([2, 2]) print np.all(reference < signal)