Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove heading tags in html table #883

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lmfit/model.py
Expand Up @@ -1693,7 +1693,7 @@ def _repr_html_(self, show_correl=True, min_correl=0.1):
report = fitreport_html_table(self, show_correl=show_correl,
min_correl=min_correl)
modname = self.model._reprstring(long=True)
return f"<h2> Model</h2> {modname} {report}"
return f"<b> Model</b> {modname} {report}"

def summary(self):
"""Return a dictionary with statistics and attributes of a ModelResult.
Expand Down
6 changes: 3 additions & 3 deletions lmfit/printfuncs.py
Expand Up @@ -249,7 +249,7 @@ def fitreport_html_table(result, show_correl=True, min_correl=0.1):
def stat_row(label, val, val2=''):
add(f'<tr><td>{label}</td><td>{val}</td><td>{val2}</td></tr>')

add('<h2>Fit Statistics</h2>')
add('<b>Fit Statistics</b>')
add('<table>')
stat_row('fitting method', result.method)
stat_row('# function evals', result.nfev)
Expand All @@ -262,7 +262,7 @@ def stat_row(label, val, val2=''):
if hasattr(result, 'rsquared'):
stat_row('R-squared', gformat(result.rsquared))
add('</table>')
add('<h2>Variables</h2>')
add('<b>Variables</b>')
add(params_html_table(result.params))
if show_correl:
correls = []
Expand All @@ -280,7 +280,7 @@ def stat_row(label, val, val2=''):
sort_correls = sorted(correls, key=lambda val: abs(val[2]))
sort_correls.reverse()
extra = f'(unreported correlations are < {min_correl:.3f})'
add(f'<h2>Correlations {extra}</h2>')
add(f'<b>Correlations {extra}</b>')
add('<table>')
for name1, name2, val in sort_correls:
stat_row(name1, name2, f"{val:+.4f}")
Expand Down