From 38a2d79ea9fac199b34653f3f89dc731d5b84b8c Mon Sep 17 00:00:00 2001 From: tlatorre Date: Fri, 24 May 2019 11:55:19 -0400 Subject: update sprintf_yaml_list() This commit changes the format specifier for the values in sprintf_yaml_list() from %.2g -> %.2f because YAML (at least the python parser) doesn't recognize values like 1e+03 as floats. --- src/fit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fit.c b/src/fit.c index fb9e13d..22028df 100644 --- a/src/fit.c +++ b/src/fit.c @@ -5844,14 +5844,14 @@ void sprintf_yaml_list(double *a, size_t n, size_t stride, char *str) size_t i; if (n == 1) { - sprintf(str,"%.2g",*a); + sprintf(str,"%.2f",*a); return; } - sprintf(str,"[%.2g",*a); + sprintf(str,"[%.2f",*a); for (i = 1; i < n; i++) - sprintf(str+strlen(str),",%.2g",a[stride*i]); + sprintf(str+strlen(str),",%.2f",a[stride*i]); sprintf(str+strlen(str),"]"); } -- cgit