Handle np.nan in image data [closes #2].