change matrix_supp_to_nan to vector_nan_from_supp