From 5b213b0ee770c808c14b327dd0dcacb6626561e1 Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Mon, 15 Oct 2012 16:45:37 -0400 Subject: [PATCH] * Little syntax optimization. --- math/fitting/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/math/fitting/__init__.py b/math/fitting/__init__.py index 50ac67a..04c7e7f 100644 --- a/math/fitting/__init__.py +++ b/math/fitting/__init__.py @@ -232,9 +232,7 @@ def fit_func(Funct, Data=None, Guess=None, x=None, y=None, if outfmt == 1: return rslt[0] else: - rec = fit_result() - for (k, v) in zip(keys, rslt): - rec[k] = v + rec = fit_result(dict(zip(keys, rslt))) rec['chi_square'] = chi_sqr rec['fit_method'] = method return rec