Fix problem where answer checker for 1 x n matrix reports incorrect dimension

Matrices that have only one row report a dimension mismatch when `ans_array` is used.   This patches fixes that problem.