values and errors return always 2D array, v and e reduce dimension by one if only one column
some optimizations