lmfit/lmfit-py — pull request #92 by tritemio (2014-06-26 00:09:38+00:00)
Title: Don't print correlations when they are NaN

When correlation between parameters are NaN `fit_report` prints them. For example the output of [this script](https://gist.github.com/tritemio/35854ac8f0a9a6be234b) is:

```
[[Variables]]
ampl: 6884.602 +/- nan (nan%) initial = 7000
baseline: 22.57765 +/- 1.745224 (7.73%) initial = 24
offset: 2.753906 +/- nan (nan%) initial = 2.8
tau: 2.766161 +/- 0.02408554 (0.87%) initial = 2.8
[[Correlations]] (unreported correlations are < 0.100)
C(ampl, tau) = nan
C(ampl, baseline) = nan
C(baseline, tau) = -0.419
C(ampl, offset) = nan
C(baseline, offset) = nan
C(offset, tau) = nan
```

Make sense to print only the meaningful correlations. With this patch `fit_report` will skip all the correlations that are NaN. With the patch the previous script will output:

```
[[Variables]]
ampl: 6884.602 +/- nan (nan%) initial = 7000
baseline: 22.57765 +/- 1.745224 (7.73%) initial = 24
offset: 2.753906 +/- nan (nan%) initial = 2.8
tau: 2.766161 +/- 0.02408554 (0.87%) initial = 2.8
[[Correlations]] (unreported correlations are < 0.100)
C(baseline, tau) = -0.419
```