modified seq_error to use numpy array