Make it possible to pass vectors directly to calculate_errors.