Make vectorization test able to survive NaN values