From 908a4e0682a91f2b002daf90f48b1322ae7b4374 Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Mon, 15 Oct 2012 16:01:46 -0400 Subject: [PATCH] * Rebase fit_result on result_base. --- math/fitting/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/math/fitting/__init__.py b/math/fitting/__init__.py index a746913..50ac67a 100644 --- a/math/fitting/__init__.py +++ b/math/fitting/__init__.py @@ -13,6 +13,7 @@ import numpy import scipy.optimize +from wpylib.db.result_base import result_base last_fit_rslt = None last_chi_sqr = None @@ -117,7 +118,7 @@ class Poly_order4(Poly_base): for i in xrange(len(x)) ]) -class fit_result(dict): +class fit_result(result_base): pass def fit_func(Funct, Data=None, Guess=None, x=None, y=None, @@ -235,5 +236,6 @@ def fit_func(Funct, Data=None, Guess=None, x=None, y=None, for (k, v) in zip(keys, rslt): rec[k] = v rec['chi_square'] = chi_sqr + rec['fit_method'] = method return rec