For some spectra (for a currently unknown reason), the pymc fit() calculation of "AICc" causes a divide by zero error. This is handled by pymc==2.3.7 , but sometimes seems to result in negative chi-squared values.
Figure out why there's a divide by 0 error in the first place
Figure out why the calculation of AICc (which doesn't seem to be used anywhere) affects the value of chi-squared
Possibly put in a check to ensure that chi-squared > 0 ?
For some spectra (for a currently unknown reason), the pymc fit() calculation of "AICc" causes a divide by zero error. This is handled by pymc==2.3.7 , but sometimes seems to result in negative chi-squared values.