diff --git a/pymcr/mcr.py b/pymcr/mcr.py index 0c30ff1..cd016f7 100644 --- a/pymcr/mcr.py +++ b/pymcr/mcr.py @@ -332,6 +332,9 @@ def fit(self, D, C=None, ST=None, st_fix=None, c_fix=None, c_first=True, self.c_regressor.fit(self.ST_.T, D.T, **self.c_fit_kwargs) C_temp = self.c_regressor.coef_ + # Remove Nan values in C_temp + C_temp = _np.nan_to_num(C_temp) + # Apply fixed C's if c_fix: C_temp[:, c_fix] = self.C_[:, c_fix]