Currently, the "fit" key value is a string with the error message if the polyfit(1) fit did not converge or an numpy error occurred.
When the dict is passed to plots.plot_pkas_fit, the function type-checks the value and aborts the plotting if its a str.
Instead, make the assignment: m, b = stats_d["fit"] work in all cases. Then, go on with plotting if 'm' is not None.
Incidentally:
Remove reference to remnant error message associated with the dict type checking line.
Currently, the "fit" key value is a string with the error message if the polyfit(1) fit did not converge or an numpy error occurred. When the dict is passed to
plots.plot_pkas_fit
, the function type-checks the value and aborts the plotting if its astr
. Instead, make the assignment:m, b = stats_d["fit"]
work in all cases. Then, go on with plotting if 'm' is not None.Incidentally: Remove reference to remnant error message associated with the dict type checking line.